# API Documentation

The API endpoints listed here are for reference purposes only. sgID users are strongly recommended to use the SDK(s) provided which sends these requests for you.

If there are no SDKs provided for your programming language, please refer to [Custom Integration](https://docs.id.gov.sg/integrations-with-sgid/custom-integration) on how to set up your own integration.

## Endpoints

{% hint style="danger" %}
**Do not reuse the example code challenge and code verifier provided in the API examples**, as this would expose your API requests to PKCE guessing attacks by malicious users. Refer to the example code under the [SDKs section](https://docs.id.gov.sg/integrations-with-sgid) on how to generate valid `<code_verifier, code_challenge>` pairs.
{% endhint %}

{% openapi src="<https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media&token=180d598a-142c-42f2-b72b-20c55cc0bcae>" path="/v2/oauth/authorize" method="get" %}
[openapi.yaml](https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media\&token=180d598a-142c-42f2-b72b-20c55cc0bcae)
{% endopenapi %}

{% openapi src="<https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media&token=180d598a-142c-42f2-b72b-20c55cc0bcae>" path="/v2/oauth/token" method="post" %}
[openapi.yaml](https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media\&token=180d598a-142c-42f2-b72b-20c55cc0bcae)
{% endopenapi %}

{% openapi src="<https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media&token=180d598a-142c-42f2-b72b-20c55cc0bcae>" path="/v2/oauth/userinfo" method="get" %}
[openapi.yaml](https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media\&token=180d598a-142c-42f2-b72b-20c55cc0bcae)
{% endopenapi %}

{% openapi src="<https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media&token=180d598a-142c-42f2-b72b-20c55cc0bcae>" path="/v2/.well-known/jwks.json" method="get" %}
[openapi.yaml](https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media\&token=180d598a-142c-42f2-b72b-20c55cc0bcae)
{% endopenapi %}

{% openapi src="<https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media&token=180d598a-142c-42f2-b72b-20c55cc0bcae>" path="/v2/.well-known/openid-configuration" method="get" %}
[openapi.yaml](https://2214909052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBW92htBuXTrDYoKovQ2%2Fuploads%2Fm4QxYNN4G7ohsReTJGlB%2Fopenapi.yaml?alt=media\&token=180d598a-142c-42f2-b72b-20c55cc0bcae)
{% endopenapi %}
