latestOpenAPI 3.0.02026-08-1091020.6 KB

6db43b35bc50

oauth

Request for user info

Exchange access token for user info as part of sgID authorization code flow (to be deprecated)

get/v1/oauth/userinfo

Response

Successfully retrieve user info from sgID

substring

End user's unique identifier for your client - This is the same value as the sub claim in the id_token returned from the previous response.

Note that as part of sgID's privacy-preserving measures, each end user's unique identifier is different for each sgID client

keystring

An AES-128-GCM symmetric key, or a block key, that is encrypted with your client's RSA-2048 public key.

dataobject

JSON object which contains the data you requested in your application scope. To prevent sgID from reading the data, the payload is encrypted with the block key referenced in the definition for the key attribute in the same response body.

Refer to our onboarding guide for instructions on decrypting the payload.

Example response

{
  "sub": "abcdef",
  "key": "eyJhbGcDpgYRL4chyXTjgim...[truncated]...Gxa2tO7nghnu-ewD5ZqA",
  "data": {
    "myinfo.nric_number": "eyJlbmMiOiJ...[truncated]...QafqHmGERc3A",
    "myinfo.name": "eyJlbmMiOi...[truncated]...UgJ9hDSTNLVw",
    "myinfo.passport_expiry_date": "eyJlbmMiOi...[truncated]...UvS41pKk9VKQ"
  }
}