# Register Your Application

First off, you will need to register a client on the [**sgID Developer Portal**](https://developer.id.gov.sg/). This will provide you with the OAuth 2.0 credentials necessary to authenticate your client with sgID, as well as a private key to decrypt user data.&#x20;

**Click the link** **below** to visit the developer portal and start the registration process!

{% embed url="<https://developer.id.gov.sg/>" %}
sgID Developer Portal
{% endembed %}

To register your client, you need to:

1. [Log in to the sgID Developer Portal with your Singpass mobile app](#step-1-login-to-the-sgid-developer-portal-with-singpass)
2. [Register a new client](#step-2-register-a-new-client)
3. [Download your new client credentials](#step-3-download-your-new-client-credentials)

### Step 1: Log in to the sgID Developer Portal with Singpass

<figure><img src="https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2FtDlFrrM5T2a25HPb5KAj%2Fimage.png?alt=media&#x26;token=09975557-c005-4c31-8d81-1b5882a16715" alt="" width="563"><figcaption><p>Click on 'Get Started' to login to the developer portal with Singpass</p></figcaption></figure>

Before you can register your client, you will have to log in to the sgID Developer Portal using your Singpass mobile app.&#x20;

{% hint style="info" %}
To be eligible for Singpass, you must be at least **15 years old** and one of the following\
(i) Singapore Citizen\
(ii) Permanent Resident\
(iii) Foreign Identification Number (FIN) Holder\
\
If you fulfill these requirements, you can register for Singpass [here](https://www.singpass.gov.sg/home/ui/register/instructions).
{% endhint %}

{% hint style="warning" %}
Before you can register your client, you will have to verify your email address (preferably your work email).
{% endhint %}

### Step 2: Register a new client

Upon login, you will be presented with this view:

<figure><img src="https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fds3InXAp0rO4KvIl1QPk%2Fimage.png?alt=media&#x26;token=73873e0b-0355-44c9-a339-8d77fa090e38" alt="" width="563"><figcaption><p>Click on 'Register new client'</p></figcaption></figure>

Click on the "Register new client" button. When registering a client, you will be prompted to fill in the following details.

{% hint style="info" %}
You will still be able to edit these fields even after registering your client.
{% endhint %}

<table><thead><tr><th width="184.40112994350278">Field Name</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>Your client display name.<br><br>This will be displayed to the end user when they are logging in to your app with the Singpass mobile app.</td></tr><tr><td>Description</td><td>A brief description of the purpose of your client application.<br><br>This will be displayed to the end user when they are logging in to your app with the Singpass mobile app.</td></tr><tr><td>Scopes</td><td>The maximum list of <a href="https://oauth.net/2/scope/">scopes</a> that your app will be authorized to access.  Please refer to the <a href="../../data-catalog">Data Catalog</a> for the full list of scopes offered by sgID. </td></tr><tr><td>Redirect URLs</td><td>The redirect URLs that sgID will be allowed to redirect to after the end user authenticates with the Singpass mobile app.<br><br>This should be the endpoint of your own application. If you are following along with the Framework Guides, please refer to the respective pages for the redirect URL to register.</td></tr></tbody></table>

<figure><img src="https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2FuFJG0a3pEkqGnmJ9s2sC%2FFile.jpg?alt=media&#x26;token=22f93442-0865-40bd-bfcd-6ccab155d374" alt="Singpass mobile consent screen with annotated sections showing where a client&#x27;s details are displayed" width="188"><figcaption><p>How your client fields are displayed in the Singpass mobile consent screen</p></figcaption></figure>

{% hint style="info" %}
Please note that if you are not a public sector employee, you will only have access to two data fields: `OpenID` and `NAME`. If you require [additional user data fields](https://docs.id.gov.sg/data-catalog), please fill out this [request form](https://form.gov.sg/643e066ca12b5c00121c2f4a). Any additional data fields that are requested must adhere to our privacy and data protection policies. We will then review your request and get back to you as soon as possible.
{% endhint %}

### Step 3: Download your new client credentials

<figure><img src="https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2FR1Yq3KRCSE8EA70oaxXM%2Fimage.png?alt=media&#x26;token=442a999c-40a0-47ee-a6d4-8ed45dcf036c" alt="" width="375"><figcaption><p>Click on 'Download credentials'</p></figcaption></figure>

After completing registration, your client credentials will be generated. Download these credentials and store them in a safe place. The fields in the credentials are as follows.

| Key          | Value Description                                                                                                      |
| ------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `id`         | This is your **client ID** and it is a unique string that identifies your client.                                      |
| `secret`     | This is your **client secret** and it is a 32-character string used for exchanging the authorization code for a token. |
| `scopes`     | The maximum list of [scopes](https://oauth.net/2/scope/) that your app is authorized to access.                        |
| `publicKey`  | The RSA-2048 **Public Key** used by sgID to encrypt data to be sent to your application                                |
| `privateKey` | The RSA-2048 **Private Key** that will be used by your application to decrypt received data                            |
