latestOpenAPI 3.0.02026-08-10484271.1 KB

320a99d164e4

Myinfo

Token

This API generates an access token when presented with a valid authcode obtained from the Authorise API. This token can then be used to request for the user's data that were consented.

post/com/v4/token

Headers

DPoPstring required

DPoP Proof (JWT) containing the partner's ephemeral public signing key that can be used to prove legit possession of the access token issued.

Response

OK.

Returning a JSON object which contains the authorization access token (JWT) that will be used to retrieve the data from Myinfo.

token_typestring required

Type of token (Bearer)

expires_ininteger

Expiry of access token (in seconds)

scopestring

Scopes requested, separated by space

Example response

{
  "access_token": {
    "client": {
      "client_id": "STG2-MYINFO-SELF-TEST",
      "client_name": "Myinfo Self Test App",
      "entity_uen": "T16GB0002G",
      "entity_name": "GovTech"
    },
    "epk": {
      "use": "enc",
      "alg": "ECDH-ES+A256KW",
      "kty": "EC",
      "kid": "M-JXqh0gh1GGUUdzNue3IUDyUiagqjHathnscUk2nS8",
      "crv": "P-256",
      "x": "qrR8PAUO6fDouV-6mVdix5IyrVMtu0PVS0nOqWBZosA",
      "y": "6xSbySYW6ke2V727TCgSOPiH4XSDgxFCUrAAMSbl9tI"
    }
  }
}