Authentication APIs for user login, logout, and token management
- Get API users for a TMC
Auth API (v2)
Request
Creates a new API user (also known as a machine user) that your application can use to authenticate with Spotnana APIs. Each API user is scoped to a specific TMC and role, giving you control over what level of access the credentials grant.
Use this endpoint to:
- Generate a dedicated
clientIdandclientSecretpair that your backend services can use to obtain access tokens. - Assign either a TMC admin or a company admin role to scope what the API user can do across your organization.
Next steps:
- Use the
clientIdandclientSecretin thePOST /v2/auth/oauth2-tokenendpoint to obtain an access token.
Notes:
- Store the
clientSecretsecurely. It is only returned once at creation and cannot be retrieved later. - You can create up to 5 API users per TMC. To increase this limit, contact your Spotnana representative.
- Only a TMC admin can use this endpoint to create API users.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/api-users
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/authapi/v2/api-users
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v2/api-users \
-H 'Content-Type: application/json' \
-d '{
"tmcId": "ecc5b835-8001-430c-98f8-fedeccebe4cf",
"orgId": "ecc5b835-8001-430c-98f8-fedeccebe4cf",
"role": "TMC_ADMIN"
}'{ "clientId": "1ddj3hs95to28iag7m4hl9lv2", "clientSecret": "1hgea74sii6os6vlkk1c7krlfgniaphbn2c56pml" }
Request
Retrieves the list of all active API users associated with the caller's TMC.
Use this endpoint to:
- Audit existing API users and their
clientIdsunder a TMC. - Look up the
clientIdfor a specific API user before rotating its client secret or revoking access.
Notes:
- This endpoint supports pagination using
limitandoffsetquery parameters. - The response includes only the
clientIdfor each user. TheclientSecretis never returned. - Returns only the API users belonging to the caller's contracting TMC.
- Only a TMC admin can use this endpoint.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/api-users
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/authapi/v2/api-users
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-ext-sboxmeta.partners.spotnana.com/v2/api-users?limit=100&offset=0'{ "apiUsers": [ { … } ] }
Request
Permanently deletes an API user and revokes its access to the Spotnana platform. This immediately invalidates all existing access tokens and removes the API user's ability to authenticate.
Use this endpoint to:
- Revoke access for an API user that is no longer needed.
- Decommission an integration or clean up unused API users.
- Free up a slot in your TMC's API user quota (default up to 5 API users per TMC).
Best practice:
Before revoking, ensure no active integrations are using this clientId. Be sure to:
- create a new API user first
- update your integrations to use the new credentials
- verify they work
- and then revoke the old API user.
Notes:
- This action is permanent and cannot be undone. The
clientIdandclientSecretare permanently invalidated. - All active tokens for this API user are invalidated immediately. Any in-flight API requests using those tokens will fail.
- The API user being revoked must belong to the same TMC as the caller.
- Only a TMC admin can use this endpoint.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/api-users/revoke
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/authapi/v2/api-users/revoke
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v2/api-users/revoke \
-H 'Content-Type: application/json' \
-d '{
"clientId": "string"
}'Request
Generates a new clientSecret for an existing API user. The old clientSecret is immediately invalidated and all existing access tokens for the API user will be expired.
Use this endpoint to:
- Rotate credentials as part of a regular security hygiene practice.
- Replace a
clientSecretwithout deleting the API user. - Generate a new
clientSecretif the old secret was lost or not stored.
Best practice:
- Update your integrations with the new
clientSecretimmediately after rotation. Any authentication requests using the old secret will fail.
Notes:
- The new
clientSecretis only returned once in the response and cannot be retrieved later. Store it securely. - The
clientIdremains the same. - The old
clientSecretstops working immediately. Any integration using it will need to re-authenticate with the new secret. - All existing access tokens created using the old
clientSecretare immediately invalidated. - Only a TMC admin can use this endpoint.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v2/api-users/rotate
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/authapi/v2/api-users/rotate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v2/api-users/rotate \
-H 'Content-Type: application/json' \
-d '{
"clientId": "string"
}'{ "clientId": "1ddj3hs95to28iag7m4hl9lv2", "clientSecret": "1hgea74sii6os6vlkk1c7krlfgniaphbn2c56pml" }