SnackMagic Authentication API

Stadium uses JWT (as Bearer token) for authentication. API provides 4 different methods to generate the token: 1. Client Credentials 2. Authorization Code (OAuth2) 3. Authorization Code using PKCE 4. Token using refresh token The authentication method to be used depends on your use case - whether you want to place orders using a global organizer account or user's own Stadium Account and your implementation details. For each method, once you generate a _token_, it needs to be set as the _Bearer_ token in the **Authorization** header. The _token_ is valid for **24 hours**. The _token_ validity can be checked with our **Validate token** API endpoint. Once expired, a new _token_ will need to be generated using the same API endpoint as used earlier. ### Client Credentials This should be used if you are an organizer and want to place an order or send points using a **global** organizer account. You can directly use the **Get Token** API endpoint to fetch the _token_ that can then be used in other APIs for authorization. ### Authorization Code (OAuth2) This should be used if you want to place an order or send points on **behalf** of a Stadium user. This uses Oauth2 flow where you will need need to make an **Authorize** request first. This will redirect the user to the Stadium login page and once they sign in, a *code* is received on the given `redirect_url`. Using this _code_, the _token_ can be fetched using the **Get Token by Code** API providing both `client_id` and `client_secret`. The `redirect_url` should be the same as given in the authorize call. ### Authorization Code using PKCE If you want to use the Authorization code method but cannot store the `client_secret` securely (like native application or SPA) you should use this flow. In this you need to [generate a PKCE](https://developer.pingidentity.com/en/tools/pkce-code-generator.html) `code_challenge` and `code_verifier` using the SHA256 method. The `code_challenge` needs to sent as an additional param to the **Authorize** request. Once the _code_ is received send the `code_verifier` as the param (instead of `client_secret`) to the **Get Token by Code** API. ### Token using refresh token You can use this to issue a new access token using an existing access token and a refresh token.

Operations 5

POST /oauth/token Get token #
GET /oauth/authorize Authorize #
POST /oauth/token_by_code Get token by code #
POST /oauth/token_by_refresh_token Get token by refresh token #
POST /oauth/validate Validate token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/snackmagic-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

snackmagic-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: '### *Stadium’s API can only be used by customers and partners on the Business and Enterprise Packages.'
  version: 2.0.0
  title: Stadium Authentication API
  termsOfService: https://www.bystadium.com/terms-of-use/
  contact:
    name: API Support
    email: engineering@bystadium.com
    url: https://www.bystadium.com
  x-logo:
    url: https://assets.auth0.bystadium.com/images/logos/color/stadium.svg
    altText: Stadium logo
servers:
- url: https://api.bystadium.com/api/v2
  description: Default server
- url: https://api.preprod.bystadium.com/api/v2
  description: Sandbox server
tags:
- name: Authentication
  description: Stadium uses JWT (as Bearer token) for authentication.
paths:
  /oauth/token:
    post:
      tags:
      - Authentication
      summary: Get token
      description: Get an access token that needs to be set as Bearer token for authorizing API.
      operationId: getToken
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjRCZC1xRHZqM3RqODZ4TDV2RDVGaiJ9.eyJpc3MiOiJodHRwczovL2F1dGgucHJlcHJvZC5ieXN0YWRpdW0uY29tLyIsInN1YiI6ImtsZEM1ZVh3aUo2NFoyVUdLSFBzcHdBcWFkWnN3bE5aQGNsaWVudHMiLCJhdWQiOiJodHRwczovL2FwaS5ieXN0YWRpdW0uY29tLyIsImlhdCI6MTY5NzQ1NjQ1NiwiZXhwIjoxNjk3NTQyODU2LCJhenAiOiJrbGRDNWVYd2lKNjRaMlVHS0hQc3B3QXFhZFpzd2xOWiIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.kuRhrHkd6Xu0rDhibvq_MllMLt0P4DUjTAKg4OcNFlLgZWsE-Mmo_3mMdbXh6IL_a5OLI8SvTexHVZmLXUBpdOGY0MPU-M0MHtt0QOlVp5wxyZJnQLbvyemnriSZxfSYqqcuofJQ3tp7tC1j9ej_-gbvfTcv_D3p8uKFxOmIWh1q3px6Zn8yW6CZEvTlHfFJXIEwtQJrof25pcIZjI-CKQZ_S4v0ch2ohPs1a3XLD95MCvrcC_isoj6BrmLxT8OysREKmpaicq3OMqTAxxRGV1vM_kir5DdlGlu7KtF79bG8e8wSJ8vtQckcyLRpeJmU_vWmA8iS5l-0GARhDJzrkw
                  expires_at:
                    type: timestamp
                    example: 1697542856
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                  description: Client ID
                  example: kldC5eXwiJ64Z2UGKHPspwAqadZswlNZ
                client_secret:
                  type: string
                  description: Client Secret
                  example: Rz0yzz1DtEVOTxXj7qewacgz81WKcFJ7HI_N7yxjv78EuIji3OH8-x0sXdKZeBjC
              required:
              - client_id
              - client_secret
  /oauth/authorize:
    get:
      tags:
      - Authentication
      summary: Authorize
      description: Redirects to the Stadium login page returning the authorization `code`
      operationId: authorize
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: OieZoR-l4FXZ9HQhy0rwZJ-8GJgBUSt0v5uzCg2QTug
                  locale:
                    type: string
                    example: en
                  userState:
                    type: string
                    example: Authenticated
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                  description: Client ID
                  example: kldC5eXwiJ64Z2UGKHPspwAqadZswlNZ
                redirect_url:
                  type: string
                  description: Callback URL to which the _code_ needs to be send after user successfully signs in
                  example: https://example.com/callback
                code_challenge:
                  type: string
                  description: Required if you want to use Authorization flow using PKCE
                  example: SS8ayGdeOwWeW9oi7veRvocGOKYfhZ-bHZ0AZ45IzSs
              required:
              - client_id
              - redirect_url
  /oauth/token_by_code:
    post:
      tags:
      - Authentication
      summary: Get token by code
      description: Exchange the authorization _code_ for `access_token` and `refresh_token`
      operationId: getTokenByCode
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjRCZC1xRHZqM3RqODZ4TDV2RDVGaiJ9.eyJpc3MiOiJodHRwczovL2F1dGgucHJlcHJvZC5ieXN0YWRpdW0uY29tLyIsInN1YiI6ImtsZEM1ZVh3aUo2NFoyVUdLSFBzcHdBcWFkWnN3bE5aQGNsaWVudHMiLCJhdWQiOiJodHRwczovL2FwaS5ieXN0YWRpdW0uY29tLyIsImlhdCI6MTY5NzQ1NjQ1NiwiZXhwIjoxNjk3NTQyODU2LCJhenAiOiJrbGRDNWVYd2lKNjRaMlVHS0hQc3B3QXFhZFpzd2xOWiIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.kuRhrHkd6Xu0rDhibvq_MllMLt0P4DUjTAKg4OcNFlLgZWsE-Mmo_3mMdbXh6IL_a5OLI8SvTexHVZmLXUBpdOGY0MPU-M0MHtt0QOlVp5wxyZJnQLbvyemnriSZxfSYqqcuofJQ3tp7tC1j9ej_-gbvfTcv_D3p8uKFxOmIWh1q3px6Zn8yW6CZEvTlHfFJXIEwtQJrof25pcIZjI-CKQZ_S4v0ch2ohPs1a3XLD95MCvrcC_isoj6BrmLxT8OysREKmpaicq3OMqTAxxRGV1vM_kir5DdlGlu7KtF79bG8e8wSJ8vtQckcyLRpeJmU_vWmA8iS5l-0GARhDJzrkw
                  refresh_token:
                    type: string
                    example: TnR5cCI6Iksfw34pXVCIsImtpIjRCZC1xRH
                  expires_in:
                    type: integer
                    example: 360
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                  description: Client ID
                  example: kldC5eXwiJ64Z2UGKHPspwAqadZswlNZ
                client_secret:
                  type: string
                  description: Client Secret. Required if not using PKCE flow.
                  example: Rz0yzz1DtEVOTxXj7qewacgz81WKcFJ7HI_N7yxjv78EuIji3OH8-x0sXdKZeBjC
                code:
                  type: string
                  description: Authorization `code` received as a response from the Authorize API
                  example: OieZoR-l4FXZ9HQhy0rwZJ-8GJgBUSt0v5uzCg2QTug
                redirect_url:
                  type: string
                  description: The same callback url that was used in the Authorize API for verification
                  example: https://example.com/callback
                code_verifier:
                  type: string
                  description: Required if you want to use Authorization flow using PKCE
                  example: JVyO9RFzl4HBZ94d-b80T54cjs8n5utBKgUTbEegsifDHe-x-onQykGSwgvHCm5gtp5hB2F9wYUoSnIt4P0h0kPH6qU2Lp9nlXBzmht2NEVIhNe9dhbSPLDra0kDQtBi
              required:
              - client_id
              - code
              - redirect_url
  /oauth/token_by_refresh_token:
    post:
      tags:
      - Authentication
      summary: Get token by refresh token
      description: Exchange the `access_token` and `refresh_token` for new `access_token`
      operationId: getTokenByRefreshToken
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0ODc5NzU0NTgsImlhdCI6MTQ4Nzk3MTg1OCwiaXNzIjoiYWNtZS5jb20iLCJzdWIiOiI4NThhNGIwMS02MmM4LTRjMmYtYmZhNy02ZDAxODgzM2JlYTciLCJhcHBsaWNhdGlvbklkIjoiM2MyMTllNTgtZWQwZS00YjE4LWFkNDgtZjRmOTI3OTNhZTMyIiwicm9sZXMiOlsiYWRtaW4iXX0.O29_m_NDa8Cj7kcpV7zw5BfFmVGsK1n3EolCj5u1M9hZ09EnkaOl5n68OLsIcpCrX0Ue58qsabag3MCNS6H4ldt6kMnH6k4bVg4TvIjoR8WE-yGcu_xDUObYKZYaHWiNeuDL1EuQQI_8HajQLND-c9juy5ILuz6Fhx8CLfHCziEHX_aQPt7jQ2IIasVzprKkgvWS07Hiv2Oskryx49wqCesl46b-30c6nfttHUDEQrVq9gaepca3Nhjj_cPtC400JgLCN9DOYIbtd69zvD8vDUOvVzMr2HGdWtKthqa35NF-3xMZKD8CShe8ZT74fNd9YZ
                  refresh_token:
                    type: string
                    example: L7zYuKstXogqioA_P3Z4fiEuga0NCVRcDSc8cy_9
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: Access Token
                  example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjRCZC1xRHZqM3RqODZ4TDV2RDVGaiJ9.eyJpc3MiOiJodHRwczovL2F1dGgucHJlcHJvZC5ieXN0YWRpdW0uY29tLyIsInN1YiI6ImtsZEM1ZVh3aUo2NFoyVUdLSFBzcHdBcWFkWnN3bE5aQGNsaWVudHMiLCJhdWQiOiJodHRwczovL2FwaS5ieXN0YWRpdW0uY29tLyIsImlhdCI6MTY5NzQ1NjQ1NiwiZXhwIjoxNjk3NTQyODU2LCJhenAiOiJrbGRDNWVYd2lKNjRaMlVHS0hQc3B3QXFhZFpzd2xOWiIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.kuRhrHkd6Xu0rDhibvq_MllMLt0P4DUjTAKg4OcNFlLgZWsE-Mmo_3mMdbXh6IL_a5OLI8SvTexHVZmLXUBpdOGY0MPU-M0MHtt0QOlVp5wxyZJnQLbvyemnriSZxfSYqqcuofJQ3tp7tC1j9ej_-gbvfTcv_D3p8uKFxOmIWh1q3px6Zn8yW6CZEvTlHfFJXIEwtQJrof25pcIZjI-CKQZ_S4v0ch2ohPs1a3XLD95MCvrcC_isoj6BrmLxT8OysREKmpaicq3OMqTAxxRGV1vM_kir5DdlGlu7KtF79bG8e8wSJ8vtQckcyLRpeJmU_vWmA8iS5l-0GARhDJzrkw
                refresh_token:
                  type: string
                  description: Refresh Token
                  example: GciOiJSUzI1NiIsInR5cCI6IkpXVCdfgr23D
              required:
              - token
              - refresh_token
  /oauth/validate:
    post:
      tags:
      - Authentication
      summary: Validate token
      description: Validate whether the access token is valid and/or expired
      operationId: validateToken
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  verified:
                    type: boolean
                    example: true
                  expires_at:
                    type: timestamp
                    example: 1697542856
      security:
      - Token: []
components:
  securitySchemes:
    Token:
      type: http
      in: header
      scheme: bearer
      bearerFormat: JWT