For the complete documentation index, see llms.txt. This page is also available as Markdown.

Exchange authorization code for user info

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.

post
/v1/profile
Authorizations
X-Api-SignaturestringRequired

Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide.

Header parameters
X-Api-SignaturestringRequired

Partner's EIP-191 signature (0x-prefixed hex).

X-Api-DeadlinestringRequired

Unix seconds when the request signature expires (within 5 minutes).

X-Api-PublicKeystringOptional

Partner's signer Ethereum address.

Body
authCodestringOptional

Authorization code from the OAuth redirect (one-time use, valid 5 minutes).

urIdinteger · int64Optional

UR user ID. The primary lookup parameter.

Responses
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.

application/json

Standard response envelope for the partner API (openapi.ur.app).

codeinteger · int64Required

0 on success; non-zero indicates a business rejection.

messagestringRequired

Human-readable diagnostic; empty on success.

dataanyOptional

Business payload. Shape depends on the endpoint.

post/v1/profile
POST /v1/profile HTTP/1.1
Host: openapi.ur.app
X-Api-Signature: text
X-Api-Deadline: text
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "authCode": "text",
  "urId": 1
}
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.

{
  "code": 0,
  "message": "",
  "data": {
    "userId": 7639951412,
    "userAddress": "0x96e023fb9b446a65273a0c01cdafdf26b5f21b3f",
    "scope": "allowance.mantle.USD24",
    "state": "custom-state",
    "authorizedAt": 1703123456
  }
}

Last updated