Skip to Content
Menu
This question has been flagged
11718 Views

Hi am trying to connect odoo via Rest API all the credentials was correct still am getting this error. Xmlrpc is working fine. 

import requests

url = 'http://x.x.x.x:8069'

headers = {
'content-type': 'application/json',
'charset':'utf-8'
}

username = 'admin'

data = {
'params':{
'fields': ['id','password'],
'domain': [('login','=', username)],
}

session = requests.Session()

​try:
    session.get('%s/api/res.users'%url, data=data, headers=headers)
except ConnectionError as ce:
    print(ce)

Avatar
Discard
Related Posts Replies Views Activity
3
Sep 21
10877
2
Jul 24
637
2
Mar 24
2748
2
Dec 23
13348
0
Oct 23
33