# Myinfo v4

<figure><img src="https://1982108655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk67iNluSpweCPqhbIY5t%2Fuploads%2FTE0gPPvxZel3w6eu16nQ%2Fimage.png?alt=media&#x26;token=f2999415-bfd2-4d5f-a164-ffa4ef5fe003" alt=""><figcaption><p>Logical overview of Myinfo v4</p></figcaption></figure>

Integrating with Myinfo requires your application to invoke 3 different APIs as part of the OAuth2.1 authorization code flow:

## **1. Authorize API**

This API triggers the Singpass authentication process, followed by presenting a consent page to the user to obtain explicit consent from the user to allow his/her personal details to be released to your application.

Our system will return a short-lived "authorization code(authcode)" at the end of this process.

{% hint style="info" %}
This API is triggered over the browser via the 302 redirect.
{% endhint %}

***

## **2. Token API**

Your application server invokes this API to obtain an access\_token, which can be used to call the /person API for the actual data. Your application needs to provide a valid authorization code(authcode) from the /authorize API in exchange for the access\_token.

The access\_token will be valid for 30 minutes.

{% hint style="info" %}
This API is a server-to-server call (does not go through the browser)
{% endhint %}

***

## **3. Person API**

This API returns a JSON response with the personal data that was requested. Your application must provide a valid access\_token from the /token API in exchange for the person data.

Once your application receives the person data, you can use this data to populate the online form on your application.

{% hint style="info" %}
This API is a server-to-server call (does not go through the browser)
{% endhint %}

![](https://api.singpass.gov.sg/assets/api-lib/myinfo/img/v4/myinfo-v4-flow.png)
