Authentication APIs for user login, logout, and token management
- Create a new API user
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.
Use this endpoint to:
- Generate a dedicated
clientIdandclientSecretpair that your backend services can use to obtain access tokens. - Create a SCIM API user by setting
credentialTypetoSCIM_TOKENwithroleset toCOMPANY_ADMIN. This returns a SCIM bearer token instead of a client secret.
Role assignment:
With
role: The API user is automatically added to the corresponding RBAC user group (TMC AdminorCompany Admin) based on the specified role. RequirestmcIdfor TMC admin, or bothorgIdandtmcIdfor company admin.Without
role: The API user is created without any RBAC roles. RequiresorgId. Use this option for granular permission control — assign specific RBAC groups or roles to the returneduserIdvia the RBAC assignment endpoints.
Credential types:
CLIENT_CREDENTIALS(default): Returns aclientIdandclientSecret. Use them inPOST /v2/auth/oauth2-tokento obtain an access token.SCIM_TOKEN: Returns a SCIM bearer token instead of a client secret. Requiresroleset toCOMPANY_ADMIN.
Next steps:
- For
CLIENT_CREDENTIALS(default): Use theclientIdandclientSecretin thePOST /v2/auth/oauth2-tokenendpoint to obtain an access token. - For
SCIM_TOKEN: Use the returnedscimTokenas the Bearer token in theAuthorizationheader for SCIM API requests (/v2/scim/Users, etc.). - If created without
role: Use the returneduserIdwithPOST /v3/user-groups/{userGroupId}/membersto add the user to RBAC groups, orPOST /v3/users/{userId}/rolesto assign roles directly.
Notes:
- Store the
clientSecretorscimTokensecurely. They are only returned once at creation and cannot be retrieved later. - There is a fixed limit on the number of API users per TMC. To increase this limit, contact your Spotnana representative.
Organization (company) ID. Required when role is omitted or COMPANY_ADMIN.
- 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",
"name": "My Integration Bot",
"role": "TMC_ADMIN",
"credentialType": "CLIENT_CREDENTIALS"
}'{ "clientId": "1ddj3hs95to28iag7m4hl9lv2", "clientSecret": "1hgea74sii6os6vlkk1c7krlfgniaphbn2c56pml", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "scimToken": "eyJzY29wZSI6InNjaW0iLCJjbGllbnRJZCI6Ii4uLiIsImVuY3J5cHRlZFNlY3JldCI6Ii4uLiJ9" }
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": [ { … } ], "totalCount": 25 }
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" }