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.
App and token
Objects
Me
appobjectrequiredThe app the token belongs to.
Fields · 8
idintegerrequiredID of the app.
namestringrequiredName of the app given by the store.
descriptionstring or nullrequiredDescription of the app; null when the store has not written one.
scopesarray of stringrequiredScopes granted to the app: what its tokens may read and change.
allowed_ipsarray of string or nullrequiredIP addresses and CIDR ranges the app may call from; null means any address.
all_locationsbooleanrequiredtrue when the app works with every location of the store, including ones added later.
location_idsarray of integer or nullrequiredLocations the app works with when all_locations is false; null when it works with all of them.
created_atstring (date-time)requiredWhen the app was created.
tokenobjectrequiredThe token of this request.
Fields · 3
namestringrequiredName of the token given when it was issued.
prefixstringrequiredVisible prefix of the token: it tells tokens apart without revealing them.
expires_atstring (date-time) or nullrequiredWhen the token expires; null when it does not expire.
store_idintegerrequiredID of the store the token belongs to.
rate_limitsobjectrequiredRate limits of the requests of the app.
Fields · 2
appobjectrequiredBucket of the app, shared by all its tokens.
Fields · 2
per_minuteintegerrequiredRequests per minute the bucket refills at.
burstintegerrequiredRequests that can go in a row before the per-minute rate applies.
storeobjectrequiredBucket of the store, shared by all its apps.
Fields · 2
per_minuteintegerrequiredRequests per minute the bucket refills at.
burstintegerrequiredRequests 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-AuthenticatestringrequiredAuthentication 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-AuthenticatestringAuthentication 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-AfterintegerrequiredSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns RateLimitProblem
503The store is temporarily unavailable
Headers
Retry-AfterintegerSeconds 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
curl "https://api.saleya.app/v1/me" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"{
"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
}
}
}