Description
User Authentication for Odoo REST API!
The API management market is valued at $5.1 billion by 2023. Also, over 90% of developers use APIs for their projects. 30% of the developers' time is spent on coding APIs. Most importantly, 83% of the internet traffic comes through APIs.
The Odoo REST API module enables you to create a RESTful API. It permits accessing and modifying data using HTTP requests. The Odoo app allows fetching, creating, updating, and deleting a record from the database by sending a response in JSON.
Further, you can choose the response to be in JSON or XML format. The module now has a user authentication feature to enhance your database security.
Benefits of Odoo REST API
- The module lets you create API keys to access Endpoints.
- It generates a separate API key for endpoint users.
- You can assign different access rights to multiple API keys.
- Create, Update, Fetch, and Delete database records from Odoo using APIs.
- User authentication adds a layer for database security and safety.
Odoo REST API Features
Alter or Access Data using HTTP Requests in Odoo
- The Odoo app permits accessing and modifying data using HTTP requests.
- Create, fetch, update, and delete a record from the database by sending a request in JSON.
Selecting the REST API Response Format in Odoo
- It allows you to choose the response format- JSON or XML based on need.
- You can further request the schema of the table from the database.
Access Endpoints using API Keys
- The REST API allows the reaction of an API key to access the endpoints and set specific data access rights for different users.
- Single API can be made available for different endpoint users.
Handle Access Rights and API Keys
- The admin can restrict specific access rights for different API keys.
- It also allows viewing the access rights message in the endpoint response.
Enhance Security with User Authentication
- The newly added user authentication ensures that only authorized users can access the API resources.
- User verification prevents data breaches, fraud, and other security risks.
User Authentication Token Generation
- Create a user authentication token from the user profile in Odoo.
- Similarly, you can offer encoded credentials in Postman to generate the validation key.
API Key Generation
- The module allows you to create API keys for different uses.
- You can configure different access rights for distinct APIs.
- You can select the availability for all or specific resources.
- Define the resources and access rights for those specific resources.
- Specify the get (read), put (write), post (create), and delete (unlink) for specific resources.
- Based on the defined access, hit the ‘Generate API Secret Key’ to create an API key.
- You can also enable or disable user authentication for an API.
Generating User Authentication Token
- A user authentication tab is added to the user profile for generating a user authentication token.
- You need to select the API key to generate a user verification token.
- You can create different authentication tokens for distinct API Keys.
- Once a user generates an authentication token for a specific key, they will be added to the user list to use that API.
- You can also generate the token from Postman by encoding the credentials from Encode64.
- The Odoo admin can create and regenerate the user authentication token for an API key.
- It helps protect the database from unauthorized access and fraudulent activities.
Odoo REST API
Webkul's dedicated support provides you with the customizations and troubleshooting solutions for Odoo REST API.
For any query or issue please CREATE A TICKET HERE. Also, check our extensive range of Odoo Apps.