For Odoo Online:
Odoo Online does not require a port number.
The server url is the instance's domain (e.g. https://mycompany.odoo.com), the database name is the name of the instance (e.g. mycompany).
The username is the configured user's login as shown by the Change Password screen.
To use XML-RPC on Odoo Online instances, you will need to set a password on the user account you want to use:
- Log in your instance with an administrator account.
- Go to Settings ‣ Users & Companies ‣ Users.
- Click on the user you want to use for XML-RPC access.
- Click on Action and select Change Password.
- Set a New Password value then click Change Password.
Starting from Odoo 14 you can generate api keys.
So instead of password you should use an API key.
To add a key to your account, simply go to your Preferences (or My Profile)
Then open the Account Security tab, and click New API Key.
For localhost:
URL and port is:
http://localhost:8069/
When you start odoo from command line you can see how to access it:
INFO ? odoo.service.server: HTTP service (werkzeug) running on localhost:8069
Default username for localhost is "admin".
The default database for localhost will be something like "odoo16". (if it is on Odoo 16)
For localhost instead of password use a generated API key.
Instance Id - I don't know. Try set it to one - 1
PS: I have created a wordpress plugin that connects to Odoo.
It requires the same data to connect to Odoo API.