Generating API keys
Odoo v14 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:
- It will open a popup as in the following screenshot. Enter the API key name and click on the Generate key button:
- This will generate the API key and show it in a new popup. Note down the API key because you will need this again: