Auth

The Auth resource is used for authentication.

POST/auth/token

Generate access token

This endpoint generates a new access token from your client credentials.

Authorization type

Basic Auth — pass your client ID and client key (clientSecret) in the Authorization header:

  1. Join them with a colon: clientId:clientSecret
  2. Base64-encode that string
  3. Send it as Authorization: Basic {encoded value}

Your client ID and key are provided by the Uprise team during partner onboarding. Do not commit them to source control.

Request

POST
/auth/token
curl https://staging-api.uprise.us/auth/token \
  -X POST \
  -H "Authorization: Basic $(echo -n '{clientId}:{clientSecret}' | base64)" \
  -H "Content-Type: application/json"

Response

{
  "access_token": "{access token}",
  "token_type": "bearer",
  "expires_in": 3590
}

POST/auth/:userId/session

Create session

This endpoint generates a new sessionId for a given userId.

Request

POST
/auth/b7447751-dc8f-4220-a3ae-fe13118192ed/session
curl  https://beta-api.uprise.us/auth/b7447751-dc8f-4220-a3ae-fe13118192ed/session \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

Response

{
  "sessionId": "{Session ID}",
}