Auth

Authentication endpoint for verifying API or OAuth tokens and inspecting session details.

Verify token

GET /auth/token

Verify your API token or OAuth access token and inspect the session details.

Scope: Any valid API token, or an API-resource OAuth access token

Description: Returns token session metadata such as granted scopes, team ID for API tokens, or OAuth client/grant IDs for OAuth access tokens. Useful for connection checks and debugging.

Request

curl "https://api.presscart.com/auth/token" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

API token response

{
  "source": "api_token",
  "team_id": "11111111-1111-1111-1111-111111111111",
  "token_type": "custom",
  "scopes": ["products.read", "orders.create", "campaigns.update"],
  "pro_pricing_enabled": true
}

OAuth response

{
  "source": "oauth",
  "oauth_client_id": "2255ea63-fa13-42dd-9a3a-213bb7403dfe",
  "oauth_grant_id": "33333333-3333-3333-3333-333333333333",
  "scopes": ["products.read", "orders.create", "campaigns.update"]
}

Response fields

FieldTypeDescription
sourcestring"api_token" or "oauth"
team_idstringUUID of the team the API token belongs to
token_typestringOne of full_access, custom, or read_only for API tokens
oauth_client_idstringOAuth client ID for OAuth access tokens
oauth_grant_idstringPresscart OAuth grant ID for OAuth access tokens
scopesstring[]List of granted scopes
pro_pricing_enabledbooleanWhether the API token team has pro pricing enabled

On this page