App and token

Who the token speaks for: the app, its scopes, locations and rate limits. The first call of an integration: it shows the token works and which scopes it lacks.

Loading the search index…

App and token

Objects

Me

  • appobjectrequired

    The app the token belongs to.

    Fields · 8
    • idintegerrequired

      ID of the app.

    • namestringrequired

      Name of the app given by the store.

    • descriptionstring or nullrequired

      Description of the app; null when the store has not written one.

    • scopesarray of stringrequired

      Scopes granted to the app: what its tokens may read and change.

    • allowed_ipsarray of string or nullrequired

      IP addresses and CIDR ranges the app may call from; null means any address.

    • all_locationsbooleanrequired

      true when the app works with every location of the store, including ones added later.

    • location_idsarray of integer or nullrequired

      Locations the app works with when all_locations is false; null when it works with all of them.

    • created_atstring (date-time)required

      When the app was created.

  • tokenobjectrequired

    The token of this request.

    Fields · 3
    • namestringrequired

      Name of the token given when it was issued.

    • prefixstringrequired

      Visible prefix of the token: it tells tokens apart without revealing them.

    • expires_atstring (date-time) or nullrequired

      When the token expires; null when it does not expire.

  • store_idintegerrequired

    ID of the store the token belongs to.

  • rate_limitsobjectrequired

    Rate limits of the requests of the app.

    Fields · 2
    • appobjectrequired

      Bucket of the app, shared by all its tokens.

      Fields · 2
      • per_minuteintegerrequired

        Requests per minute the bucket refills at.

      • burstintegerrequired

        Requests that can go in a row before the per-minute rate applies.

    • storeobjectrequired

      Bucket of the store, shared by all its apps.

      Fields · 2
      • per_minuteintegerrequired

        Requests per minute the bucket refills at.

      • burstintegerrequired

        Requests that can go in a row before the per-minute rate applies.

Endpoints

Get the app behind the token, its access and rate limits

get/me

Scope: any token of the store

Responses

200Success

application/json

Returns Me

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl "https://api.saleya.app/v1/me" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN"
Example response · 200
{
  "app": {
    "id": 0,
    "name": "string",
    "description": "string",
    "scopes": [
      "string"
    ],
    "allowed_ips": [
      "string"
    ],
    "all_locations": true,
    "location_ids": [
      0
    ],
    "created_at": "2026-01-15T12:00:00Z"
  },
  "token": {
    "name": "string",
    "prefix": "string",
    "expires_at": "2026-01-15T12:00:00Z"
  },
  "store_id": 0,
  "rate_limits": {
    "app": {
      "per_minute": 0,
      "burst": 0
    },
    "store": {
      "per_minute": 0,
      "burst": 0
    }
  }
}