Telstra OIDC Access Token Request API

Request for access token to make the API request

GitHub OpenAPI

Operations 1

POST /token Request for OAuth2 access token #

Documentation

Specifications

Schemas & Data

Other Resources

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/telstra:telstra-oidc-access-token-request-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

telstra-oidc-access-token-request-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Device Swap OIDC Access Token Request API
  description: 'This API allows to check the last time that the phone (device) - phone number association has changed


    # Introduction


    The Device Swap API performs real-time checks on the last Device Swap event, providing real-time information about whether the SIM card associated with a user''s phone number has been transferred to a different physical device. Device Swap information can be invaluable for enhancing security, fraud detection, and ensuring compliance with regulatory requirements in various applications, apart from providing useful information of device upgrade trends in user segments. This API is used by an application to get information about a mobile line''s latest Device Swap date. It can be easily integrated and used through this secured API and allows API consumers to get this information in an easy and secured way. The API provides management of 2 endpoints answering 2 distinct questions:


    * When did the last Device Swap occur? * Has a Device Swap occurred during the last n hours? # Relevant terms and definitions


    **Device Swap:** A Device Swap is a process in which the association between a user''s mobile phone number (MSISDN) and a device (IMEI) is created for the first time or changes for any reasons. # API Functionality


    The Device Swap API provides a programmable interface for developers and other users (capabilities consumers) to request the last date of a device swap performed on the mobile line, or, to check whether a device swap has been performed during a past period. The API provides 2 operations:


    - POST retrieve-date: Provides timestamp of latest device swap, if any, for a given phone number. - If no swap has been performed and the network operator supports unlimited DeviceSwap monitoring timeframe, the API will return the first phone number usage in a device (the timestamp of the first time that the phone number was connected to the network, it is, the first time that the SIM is installed in a device). - If the latest device swap date (or the first phone number usage, if no device swap) cannot be communicated due to local regulations (or Network Operator internal privacy policies) preventing the safekeeping of the information for longer than the stated period, a `null` value will be returned. Optionally, a `monitoredPeriod` could be provided to indicate monitored time frame (in days) supported by the Network Operator. In this case the response must be treated as "there were no device swap events during ''monitoredPeriod''. Either the parameter is optional, it is recommended to support it in DeviceSwap implementations. - POST check: Checks if device swap has been performed during a past period (defined in the request with ''maxAge'' attribute) for a given phone number, the API will return boolean response (true/false), indicating that the device has been swapped or not in the specified period. In case the phone number has never been installed in a device, or no data is available in the operators records (e.g. database error), API will return a 422 error. # Identifying the phone number from the access token


    This API requires the API consumer to identify a phone number as the subject of the API. There is 2 ways to retrieve it depending on the authorization flow used:

    - When the API is invoked using a two-legged access token, the phone number will be identified from the optional `phoneNumber` identifier, which therefore MUST be provided. - When a three-legged access token is used however, this optional `phoneNumber` identifier MUST NOT be provided, as the phone number will be uniquely identified from the access token. This approach simplifies API usage for API consumers using a three-legged access token to invoke the API by relying on the information that is associated with the access token and was identified during the authentication process.'
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
  x-camara-commonalities: 0.6
servers:
- url: '{apiRoot}/device-swap/v1'
  variables:
    apiRoot:
      default: http://localhost:8080
      description: API root, defined by the service provider, e.g. `api.example.com` or `api.example.com/somepath`
tags:
- name: OIDC Access Token Request
  description: Request for access token to make the API request
paths:
  /token:
    post:
      tags:
      - OIDC Access Token Request
      summary: Request for OAuth2 access token
      description: To generate an OAuth2 Access token, use your `Client ID` and `Client secret` that you get from the Telstra Developer portal. You will also need the `Code` that was received in the previous leg.
      security:
      - {}
      servers:
      - url: https://prod.okapi.ogw.evolve.okapi.telstra.com/og-network-auth-prod/api/realms/network-auth/protocol/openid-connect
        description: OAuth2 server
      operationId: authToken
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  description: Client ID generated on your Telstra Developer account
                  type: string
                client_secret:
                  description: Client Secret generated on your Telstra Developer account
                  type: string
                grant_type:
                  type: string
                  default: authorization_code
                code:
                  type: string
                redirect_uri:
                  type: string
                  default: http://localhost:8080/auth
              required:
              - grant_type
              - code
              - client_id
              - client_secret
              - redirect_uri
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    description: OAuth access token
                    type: string
                  token_type:
                    description: OAuth token type
                    type: string
                  expires_in:
                    description: OAuth expiry time in seconds.
                    type: string
                  scope:
                    description: Scopes requested for during Authentication Request
                    type: string
        '400':
          description: '`grant_type` is incorrect. `grant_type` should be `client_credentials` (without quotes).

            '
        '401':
          description: 'Either client_id or client_secret or both are not valid.

            '
        '404':
          description: 'The requested URI does not exist

            '
        '503':
          description: 'The service is currently unavailable.

            '
        default:
          description: 'An internal error occurred when processing the request.


            If the error persists even after re-try, check out https://dev.telstra.com/status page to ensure the service is up and running.

            '
components:
  securitySchemes:
    openId:
      type: openIdConnect
      openIdConnectUrl: https://example.com/.well-known/openid-configuration
    OAuth2:
      type: oauth2
      description: This API will use OAuth2 security with **client_credentials** grant type.
      flows:
        authorizationCode:
          authorizationUrl: https://prod.okapi.ogw.evolve.okapi.telstra.com/
          tokenUrl: https://prod.okapi.ogw.evolve.okapi.telstra.com/og-network-auth-model/api/realms/network-auth/protocol/openid-connect/token
          scopes:
            iot-naap-outage:read: Read access for the IoT outage API.
            iot-naap-outage:write: Write access for the IoT outage API.
externalDocs:
  description: Product documentation at CAMARA
  url: https://github.com/camaraproject/DeviceSwap