---
title: "Exchange authorization code for user info"
method: POST
path: "/v1/profile"
tags: ["Delegated Contract Mode"]
---

# Exchange authorization code for user info

`POST /v1/profile`

Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns the user's UR identity and authorization information. Provide at least one of urId or authCode; the endpoint primarily uses urId today, and authCode (the one-time OAuth code, valid 5 minutes) supports the authorization-code exchange. Partner-signed request. An invalid or expired code returns code 4001.

## Headers

- `X-Api-Signature` string, required
- `X-Api-Deadline` string, required
- `X-Api-PublicKey` string

## Request body

- object
  - `authCode` string — Authorization code from the OAuth redirect (one-time use, valid 5 minutes).
  - `urId` integer — UR user ID. The primary lookup parameter.

## Response `200`

Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.

- DcEnvelope — Standard response envelope for the partner API (openapi.ur.app).
  - `code` integer, required — 0 on success; non-zero indicates a business rejection.
  - `message` string, required — Human-readable diagnostic; empty on success.
  - `data` unknown

---

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