Access Token

With your client credentials, your application will make a direct request to the OAuth authorization server's Token endpoint to exchange them for an Access Token.

URL

Prod

Audience : https://ibexhub.ibexmercado.com

OAUTH2_DOMAIN : https://auth.hub.poweredbyibex.io

Sandbox

Audience : https://api-sandbox.poweredbyibex.io

OAUTH2_DOMAIN : https://auth.hub.sandbox.poweredbyibex.io


Making the Token Request

Your service client must send an HTTP POST request to the Auth0 token endpoint with the following specifications:

ParameterValueDescription
MethodPOSTHTTP method for the request
URL<OAUTH2_DOMAIN>/oauth/tokenReplace AUTH0_DOMAIN with your actual Auth0 domain see above
Content-Typeapplication/x-www-form-urlencodedStandard encoding for form data

Request Parameters

Include these parameters in the request body:

ParameterRequiredDescription
grant_typeYesMust be set to client_credentials
client_idYesYour application's client identifier
client_secretYesYour application's client secret
audienceYesThe unique identifier of the target API. See above audiences

Token Lifetime

Access tokens expire 1 hour after they're issued. Once expired, requests made with that token will be rejected — request a new one before continuing.

Reuse Your Token

Cache your access token and reuse it for its full lifetime instead of requesting a new one on every call. Avoid creating more than 2 tokens per hour per client — repeated, unnecessary re-authentication may be throttled.

Best Practices

Store client credentials securely using environment variables or secret management systems. Always use HTTPS for token requests. Implement proper token caching and renewal strategies. Monitor token expiration times to avoid service interruptions. When creating the client, whitelist the public IP addresses that will access it.

Common Issues

Invalid credentials: Double-check your client ID and secret. Wrong audience: Verify the API identifier matches your configuration. Scope issues: Ensure requested scopes are allowed for your client. Rate limiting: Implement appropriate retry logic with exponential backoff. If IP whitelisting isn't working, verify your IP address. In some cases, requests may be sent from your IPv6 address. Our IP whitelisting supports both IPv4 and IPv6.