---
title: "Request for user info"
method: GET
path: "/v1/oauth/userinfo"
tags: ["oauth"]
---

# Request for user info

`GET /v1/oauth/userinfo`

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

## Response `200`

Successfully retrieve user info from sgID

- GetUserInfoSuccess
  - `sub` string — 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
  - `key` string — An AES-128-GCM symmetric key, or a block key, that is encrypted with your client's RSA-2048 public key.
  - `data` object — 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.

## Other responses

- `401` — Missing or invalid bearer token
- `500` — Server error

---

[API](https://skmtc.net/sgid/apis/sgid-api.md) · [All operations](https://skmtc.net/sgid/apis/sgid-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sgid/sgid-api/revisions/6db43b35bc50/schema)
