Skip to Content
This question has been flagged
118 Views

I have found this code connect odoo with api but from where I can get url, db,username, and password? Can anyone help me from where I can get these credentials?

I have found psql information from odoo shell env. I tried but its showing authentication failed.


Looking for these credentials. Anyone can help to find these information?



import requests

url = "instance url"
db = "your_database"
username = "your_username"
password = "your_password"

headers = {'Content-Type': 'application/json'}
data = {
    'jsonrpc': '2.0',
    'method': 'call',
    'params': {
        'db': db,
        'login': username,
        'password': password
    },
    'id': 1
}

response = requests.post(url, json=data, headers=headers)
session_id = response.cookies.get('session_id')





Avatar
Discard
Related Posts Replies Views Activity
1
Jun 24
475
1
Mar 24
443
2
Mar 24
3649
0
Jan 24
324
0
Dec 23
301