Dream Sports Token Exchange API

The Token Exchange API from Dream Sports — 1 operation(s) for token exchange.

Operations 1

POST /v1/code-token-exchange Exchange authorization code for tokens

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/dream-sports-token-exchange-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 email required.

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

OpenAPI Specification

dream-sports-token-exchange-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Guardian Token Exchange API
  version: 1.0.0
servers:
- url: https://auth.dream11.com/
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Token Exchange
paths:
  /v1/code-token-exchange:
    post:
      tags:
      - Token Exchange
      summary: Exchange authorization code for tokens
      description: 'Exchange an authorization code for access and refresh tokens.


        This endpoint is used in the OAuth 2.0 authorization code flow to

        exchange the authorization code received from the authorization endpoint

        for access and refresh tokens.

        '
      parameters:
      - $ref: '#/components/parameters/TenantIdHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1CodeTokenExchangeRequestBody'
      responses:
        '200':
          description: Token exchange successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          description: Bad Request due to missing parameters or invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid client credentials or code
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TokenResponse:
      type: object
      properties:
        accessToken:
          type: string
          example: accesstoken
          description: Short lived Bearer JWT token to access APIs.
        refreshToken:
          type: string
          example: refreshToken
          description: Long Lived token used to refresh access token.
        idToken:
          type: string
          example: idToken
          description: OpenID Connect ID token
        tokenType:
          type: string
          example: Bearer
          description: type of token. Only supports Bearer for now.
        expiresIn:
          type: integer
          example: 3600
          description: expiry of the access token in seconds
        isNewUser:
          type: boolean
          description: Indicates if the user is new
          example: false
    V1CodeTokenExchangeRequestBody:
      type: object
      description: Request body for exchanging authorization code for tokens
      required:
      - code
      properties:
        code:
          type: string
          description: Authorization code received from authorization endpoint
          example: auth_code_abc123
          minLength: 1
      example:
        code: auth_code_abc123
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code identifying the type of error
              example: invalid_request
            message:
              type: string
              description: Human-readable error message
              example: Something went wrong.
  parameters:
    TenantIdHeader:
      name: tenant-id
      in: header
      description: tenant-id of the client integrating with guardian
      required: true
      schema:
        type: string