Your client secret grants access to your network’s data. Only use it from your servers: never put it in a browser, mobile app, or any other client-side code.
Create API credentials
1
Open the Developers page
Log in to Network Manager and go to Settings > Developers.
2
Create the credentials
Under Create API credentials, enter a name that tells you where they’re used (for example,
Fleet integration) and select Create API credentials.3
Save the client secret
Copy the client ID and client secret and store them somewhere safe, such as your secrets manager.
Request an access token
Send aPOST request to the token URL:
Using the API in QA? Request tokens from
https://api-auth.qa.energy.nayax.com/oauth2/token instead.- Body:
grant_type=client_credentials, sent form-encoded (Content-Type: application/x-www-form-urlencoded). A JSON body is rejected with415 Unsupported Media Type. - Credentials: your client ID and client secret, as HTTP Basic authentication (recommended), or as
client_idandclient_secretfields in the body. - Don’t send
scope. Your token always carries all the scopes your credentials were given; requesting one returnsinvalid_scope.
Call the API
Send the token in theAuthorization header of every request:
Reuse tokens until they expire
A token is valid for 24 hours (expires_in is in seconds). Request one, cache it, and reuse it for every API call until shortly before it expires. Don’t request a new token per API call.
Token request limits
Each set of API credentials can request at most:
Past either limit, the token URL answers
400 with an error saying the hourly or daily token quota is exceeded, until that window resets. Tokens you already have keep working.
An integration that reuses its token for its 24-hour lifetime needs about one token a day. If you run several servers or workers, share one token between them (for example, through a cache) rather than requesting one in each.