latestOpenAPI 3.0.02026-08-10484271.1 KB

320a99d164e4

Myinfo

Authorise

This API triggers Singpass login and obtain consent for the user to retrieve user's data from Myinfo. Once the user has authenticated and consented, an authorisation code (authcode) will be returned via the callback URL defined. The authcode can then be used to retrieve an access token via the Token API.

Note: This API is public and should be implemented as a link or button on partner's online webpage. Note: For partners integrating via android mobile application, please ensure that the "setDomStorageEnable" attribute is enabled.

get/com/v4/authorize

Query parameters

purpose_idstring required

purpose_id should have a corresponding pre-registered purpose(s) description as part of the setup. Purpose description refers to what the user will see in the consent page

response_typestring required

Response type for authorisation code flow - must be "code".

scopestring[] required

Space separated list of scopes requested. Possible scopes are listed in the scopes of the OAuth2 Security Schema above.

code_challengestring required
Example:BuXV0_h20H2KgRkhQ2cwDKDkSOcctPPozQv0JRP8D8k

Value resulting from performing Base64 encoding of a SHA256 hash of code_verifier (cryptographic random value generate on server side.) Refer to the section on Proof Key for Code Exchange (PKCE) for more information.

code_challenge_methodstring required
Example:S256

Hashing method used in producing code_challenge. Only supports 'S256'

redirect_uristring required

Partner's callback URL for Myinfo to return with the authorisation code.

client_idstring required
Example:STG-180099999K-TEST01

Unique ID for partner's application.

app_launch_urlstring

Url scheme to launch back user's mobile app after successful authentication using Singpass mobile.

subentity_idstring
Example:180099736H

UEN of the SaaS partner's client that will be receiving the person data.