Versions | 12.0 | 13.0 | 14.0 | 15.0 | 16.0 | 17.0 | 18.0 |
---|---|---|---|---|---|---|---|
Community | |||||||
Enterprise |
https://www.ekika.co/support

OAuth 2.0 Authentication for APIs
- Our All API Addons: EKIKA API Addons
- All-in-One is “api_framework” (Buy): Easy API Framework

Introduction
OAuth2 stands for “Open Authorization 2.0“. It is the second version of the OAuth protocol, which is an open standard for access delegation commonly used for API authentication and authorization. OAuth 2.0 is a widely used authorization framework that allows applications to securely access resources on behalf of users without needing their credentials. It’s commonly used for API authentication in web and mobile applications. OAuth 2.0 uses Access Tokens, an Access Token is a piece of data that represents the authorization to access resources on behalf of the end-user.
How It Works:
The API OAuth2 Authentication module for Odoo integrates the OAuth2 authorization coupled with api framework, ensuring secure API access with the authorization-code-grant flow of the specification. It provides seamless management of client authentication and token lifecycle, making it an essential component of the API bundle. This module enhances the security and functionality of your Odoo API integrations.
Benefits
- Enhanced security with OAuth2 standards.
- Simplified client authorization.
- Comprehensive token management.
- Seamless integration with Odoo.
- Developer-friendly with clear examples.
- Reliable access control.
- Scalable for businesses of all sizes.
Usage
- Secure API integration with third-party applications.
- Protect sensitive data accessed via APIs.
- Streamline OAuth2 authentication processes.
- Automate token lifecycle management, including issuance, refresh, and revocation.
- Simplify the development and deployment of secure API endpoints.
Authorization and Token Related Steps:
- First, client register redirect-uri, which is provided in api record form, to its respected provider.
- Client has to made request to
“/<api>/oauth2/provider/authorize”
with its client_id in request-body(json), which returns authorization_url in json-body from response. - When client use this authorization_url, client has to authorize with its respected user, after successful authorization server returns token
information.
Which includes: - access_token, refresh_token, expires_in, expires_at, scope, token_type, id_token. Note: This differs from provider to provider.
- db, login
- If client wants to refresh the token & get access-token then made request to
“/<api>/oauth2/token” with its client-id,
client-user-identity in request-body(json), which returns new token related information. - If client wants to revoke the token then made request to
“/<api>/oauth2/revoke” with its client-id,
client-user-identity in request-body(json), which revoke the token from authorization server and also delete the client api user record.
API Resource Access Steps:
- When client want fetch api data using oauth2 method, made http-request using header:
Authorization: Bearer access_token_value
- If access_token is valid then it return response data and if access_token is invalid then client has to refresh the token or authorize the user again.
Python Request Examples:
1. Client Authorization:
import requests import json url = "https://easyapi.ekika.app/jsonapiext/oauth2/provider/authorize" payload = json.dumps({ "client_id": "YOUR_CLIENT_ID", "client_user_identity": "YOUR_UNIQUE_CLIENT_IDENTITY" }) headers = { 'Content-Type': 'application/json' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
2. Refresh Token:
import requests import json url = "https://easyapi.ekika.app/jsonapiext/oauth2/token" payload = json.dumps({ "client_id": "YOUR_CLIENT_ID", "client_user_identity": "YOUR_UNIQUE_CLIENT_IDENTITY" }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
3. Revoke Token:
import requests import json url = "https://easyapi.ekika.app/jsonapiext/oauth2/revoke" payload = json.dumps({ "client_id": "YOUR_CLIENT_ID", "client_user_identity": "YOUR_UNIQUE_CLIENT_IDENTITY" }) headers = { 'Content-Type': 'application/json' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
Configuring API OAuth2 Authentication
Frequently Asked Questions (FAQs)
Find answers of common questions you might have about this addon. If you don’t see your question
addressed here, feel free to contact us!
Contact Us:
- Whats App / Phone: +919510031431
—
URGENT - EMail: hello@ekika.co
- Skype: amshukla17
- Website: https://ekika.co
- Support Ticket: https://ekika.co/support
—
Get Notifications of Progress. - 24 x 7 Available! Contact us NOW.
We love hearing your ideas for improvement! If you have a feature in
mind
that
would make your Odoo experience even better, simply contact us.
We’re happy
to
discuss your needs and explore the best way to implement them.
We offer a wide range of Odoo services to help you at any stage,
from
initial
setup
(“implementation”) to ongoing customization and support. This
includes:
- Adding new features and functionalities (“addons development”)
- Changing behaviour of whole system (“server and structure level
changes”) - Server maintenance and configuration changes (“nginx /
filestores / size
issues
etc.”) - Integration with other systems
- RESTful APIs, WebHooks, Slave-Master DB, Real-time data
communication
(“socket
connection”) etc. - Improving app performance and user experience (“performance
tuning” and
“UI/UX
design”) - Secure and reliable managed hosting solutions
- Annual maintenance contracts to keep your Odoo running smoothly
and so
much
more…
Basically, we’re your one-stop shop for all things Odoo! We offer
premium
services
at competitive rates.
Need Help?
EKIKA Has Your Back – 24/7 Support.
We’re just a message away, no matter the time zone.
90 Days
Free Support
We understand that even with great documentation, you might have questions or need
additional assistance. That’s why we offer exceptional support.
(copy link to clipboard)
(copy link to clipboard)
(copy link to clipboard)
Services EKIKA Provides
EKIKA is your destination for expert Odoo ERP implementation and customization. We pride
ourselves on building reliable, trust-based partnerships that give you full transparency and control
over your business processes.
With over 12 years of experience, we can assist you with eCommerce platforms, production
planning, point-of-sale systems, managing inventory adjustments, and providing advanced field worker
tracking solutions to optimize your workflows and boost operational efficiency.

Implementation
Utilise Odoo ERP tailored for your business
needs for smooth operations.

Customization
Personalized adjustments to Odoo modules for
seamless management.

Support
Ongoing assistance and maintenance to optimize
your Odoo system’s performance.
Are you struggling with disorganized operations, high operational costs, or lack of
transparency in your processes? What sets us apart is our commitment to personalized solutions
tailored to your unique business needs and our proactive support, ensuring seamless integration and
ongoing success.
Would you like to explore Odoo ERP for your business? Schedule a free consultation with
EKIKA today!

You must log in to submit a review.