Overview
OAuth 2.0 stands as a pivotal mechanism for merchants to obtain validaccess_token
from the Nomba API Server, providing a framework for secure and efficient interactions with our platform. Within this protocol, two distinct processes, namely the Client-credentials flow and the PKCE flow flow, offer versatile approaches to acquiring the access_token
Quick Action
Obtain access token
Generate access_token required to access resources
Refresh access token
Refresh access_token when they get expired
Revoke access token
Revoke access_token from accessing resources
Client-credentials flow
This flow is specifically tailored for execution on the merchant’s server or backend infrastructure. The process unfolds as follows:1
Initiation of Token Request
The merchant’s server, residing in the backend, initiates the token request by invoking the IssueToken endpoint on the Nomba API. This request includes the client_id and client_secret, credentials obtained from the merchant’s Nomba dashboard.

Token request initiation
2
Token Issuance by Nomba
Nomba diligently validates the provided client_id and client_secret against its records. Upon successful validation, Nomba issues an 
access_token
accompanied by a refresh_token. These tokens empower the merchant’s server to make authorized API calls on behalf of the client.
Refreshing your access_token
PKCE flow
The PKCE flow also known as the Proof Key for Code Exchange, is not yet available for public use
1
Client Generates Code Verifier and Code Challenge
The client initiates the PKCE flow by generating a random
code_verifier
.
From this code_verifier
, the client then computes a code_challenge
. Typically, the code_challenge
is the Base64-encoded SHA256 hash of the code_verifier
, as specified in Page 17 of RFC 76362
Client Sends Code Challenge to Authorize Endpoint
The client includes the
code_challenge
when making a request to the PKCE authorization endpoint of the Nomba API. This is part of the initial step in the OAuth 2.0 authorization process.3
Nomba Returns Auth Code
Upon successful processing of the authorization request, we returns an
auth_code
. The auth_code
serves as a temporary authorization code that the client will exchange for an access_token
.4
Client Calls IssueToken Endpoint
The client proceeds to call the IssueToken endpoint with the obtained
auth_code
and the original code_verifier
.5
Nomba Verifies auth code, Code Verifier and Issues Tokens
Nomba receives the request to IssueToken and verifies that the
code_verifier
matches the code_challenge
associated with the auth_code
. If the verification is successful, Nomba issues the requested access_token
along with a refresh_token.code_verifier
is required during the token exchange.

PKCE flow