Baack

API Client Bearer Token

Browse the docs

Endpoints

  • CreatePOST/n/v1/bearertoken/

    Endpoint used to issue new bearer tokens for an API client. Actual the token is only returned on create and an obfuscated token is returned on read.

    Baack allocates the URN and returns it in the response.

    Request body: API Client Bearer Token

    Responses

    201 Created
    returns API Client Bearer TokenCREATE_SUCCESS
    400 Bad request
    returns ErrorINVALID_REPRESENTATION
  • ReadGET/n/v1/bearertoken/{urn}

    Endpoint used to issue new bearer tokens for an API client. Actual the token is only returned on create and an obfuscated token is returned on read.

    Notes

    • Multiple bearer tokens can be assigned for a client.
    • It is recommended to use token expiration and rotate tokens.
    • For client side or tokens which are distributed, create a separate API client with restricted permissions and roles.
    • Bearer tokens can be revoked if they are known to be compromised. You will be notified and the expiration set accordingly.
    • New bearer token values are only returned on CREATE / POST

    Parameters

    urn (path, required)

    String representation of a Unique Resource Name. Typically a UUID with 36 characters.

    Responses

    200 OK
    returns API Client Bearer TokenREAD_SUCCESS
    404 Not found
    returns ErrorNOT_FOUND
    curl -H "Authorization: Bearer $BAACK_API_TOKEN" \
      https://api.baack.co/n/v1/bearertoken/{urn}
  • UpdatePUT/n/v1/bearertoken/{urn}

    Endpoint used to issue new bearer tokens for an API client. Actual the token is only returned on create and an obfuscated token is returned on read.

    Parameters

    urn (path, required)

    String representation of a Unique Resource Name. Typically a UUID with 36 characters.

    Request body: API Client Bearer Token

    Responses

    202
    returns API Client Bearer TokenUPDATE_SUCCESS
    400 Bad request
    returns ErrorINVALID_REPRESENTATION
  • DeleteDELETE/n/v1/bearertoken/{urn}

    Endpoint used to issue new bearer tokens for an API client. Actual the token is only returned on create and an obfuscated token is returned on read.

    Parameters

    urn (path, required)

    String representation of a Unique Resource Name. Typically a UUID with 36 characters.

    Responses

    202
    DELETE_SUCCESS

Webhook

POSTyour destination URL

Subject: BEARER_TOKEN

Webhook for API client bearer token events to monitor API token state.

API clients typically use bearer tokens for access, whether for server side 'secure' tokens or client side 'insecure' tokens which are typically more restricted in their permissions. The Bearer Token webhook allows integrations to monitor the issuance of bearer tokens to effectively manage the bearer token lifecycle and distribution. Rotating tokens regularly helps improve security so it is recommended to periodically create new tokens. Using the Bearer Token webhook your integration can always stay up to date with new token issuance and revocations.

Body: Webhook Event

Your response

200
Return 200 status to indicate that data was received successfully

Fields

API Client Bearer Token fields
FieldTypeDescription
urnstring (uuid)
apiClientAPI Client

Required on create.Ignored on update.

.

bearerTokenstring
expirationTimestampstring (date-time)

Required on create.

.

Used by: API Client