Get a token for an account

Overview

Issue a token that acts as the account's owner.

Use this before calling account-scoped endpoints on a customer's behalf. A token lasts 7 days. Repeat calls return the same token while it's still valid, for up to 6 days after it was issued; after that a new token is issued and the previous one is revoked (prior_tokens_revoked counts them).

You'll need the account's id.

Returns a token. Use it as the Authorization header for the account-scoped calls.

Prerequisites

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/partner/account-owner/token

Authentication

Partner token

  • Any other token gets 403 Only partner users can mint brand-owner tokens.
  • account_id must be an account inside your partner's tree; otherwise 403 Brand is not under your partner tree.
  • The token acts as the account's owner: it can do anything the owner can, on that account only.

Rate limit

120 requests per minute, counted per user (the token’s user). See Rate limits.

Request parameters

None.

Request body

FieldTypeRequiredNotes
account_idintegerYesThe account to get a token for. Must exist, be an account (not a partner or location), and be inside your partner's tree.

Request payload

{
  "account_id": 5994
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
tokenstringThe bearer token for the account's owner. Send it as Authorization: Bearer <token>.
account_ownerobjectWho the token acts as.
account_owner.user_idintegerThe account owner's user id.
account_owner.account_idintegerThe account's id.
account_owner.expires_atstring or nullWhen the token expires (ISO 8601).
account_owner.prior_tokens_revokedintegerHow many earlier tokens were revoked by this call. 0 when the same token was returned again.

Response payload

{
  "data": {
    "status": "success",
    "token": "<access-token>",
    "account_owner": {
      "user_id": 3011,
      "account_id": 5994,
      "expires_at": "2026-10-08T00:00:00+10:00",
      "prior_tokens_revoked": 0
    }
  }
}

Examples

Success payload

The first token for this owner, or the same token again: see Response payload.

A new token, with the previous one revoked:

{
  "data": {
    "status": "success",
    "token": "<access-token>",
    "account_owner": {
      "user_id": 3011,
      "account_id": 5994,
      "expires_at": "2026-10-08T00:00:00+10:00",
      "prior_tokens_revoked": 1
    }
  }
}

Error payload

403 Not a Partner token

{
  "message": "Forbidden",
  "status": "error",
  "errors": "Only partner users can mint brand-owner tokens."
}

403 Account outside your tree

{
  "message": "Forbidden",
  "status": "error",
  "errors": "Brand is not under your partner tree."
}

404 Not an account

account_id is a partner or a location, not an account.

{
  "message": "Not Found",
  "status": "error",
  "errors": "Company is not a brand."
}

404 Account has no owner

{
  "message": "Not Found",
  "status": "error",
  "errors": "Brand has no owner user."
}

422 account_id missing

{
  "message": "The account id field is required.",
  "errors": {
    "account_id": [
      "The account id field is required."
    ]
  }
}

422 Account doesn't exist

{
  "message": "The selected account id is invalid.",
  "errors": {
    "account_id": [
      "The selected account id is invalid."
    ]
  }
}
StatusMeaning
200The token.
401The token is missing, expired or invalid.
403The token isn't a Partner token, or the account is outside your tree.
404account_id isn't an account, or the account has no owner.
422account_id is missing, isn't an integer, or doesn't exist.
429More than 120 requests in a minute from this user.
500Unexpected server error.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/partner/account-owner/token" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"account_id": 5994}'

Did this page help you?