Generating API keys
Odoo v17 has built-in support for the two-factor authentication (2FA) feature. 2FA is an extra layer of security for user accounts and users need to enter a password and time-based code. If you have enabled 2FA, then you won’t be able to use RPC by entering your user ID and password. To fix this, you will need to generate an API key for the user. In this recipe, we will see how you can generate API keys.
How to do it...
Perform the following steps to generate an API key for RPC:
- Open user preferences and open the Account Security tab.
- Click on the New API Key button:
Figure 20.1 – Generating a new API key
- It will open a popup, as in the following screenshot. Enter the API key name and click on the Generate key button:
Figure 20.2 – Naming your key
- This will generate the API key and show it in a new popup. Note down the API key because you will need...