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')