> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inquiry User Info By Access Token

> Query the authorized user's information with an access token.

`POST /v1/customers/user/inquiryUserInfoByAccessToken`

Lets the merchant get the user's information after the user has authorized the Mini Program. The access token is obtained via OAuth after a successful authorization ([applyToken](https://docs.rebellapp.com/openapis/v1/authorizations/applyToken.md)); the information returned is limited to the scopes the user granted. See also [inquiryUserInfo](https://docs.rebellapp.com/openapis/v1/customers/inquiryUserInfo.md).

## Request Parameters

**accessToken** `string` *required*

Access token used to access the user's resource scope.

**Max length**: 128 characters

**authClientId** `string`

Unique ID assigned by the wallet to identify the client.

**Max length**: 128 characters

**extendInfo** `string`

Extended information (JSON string). Key:

* `customerBelongsTo`: the e-wallet the customer uses, corresponding to the `siteName` from [`my.getSiteInfo`](https://docs.rebellapp.com/jsapi/alipay-connect/my.getSiteInfo). **Mandatory in the Mini Program scenario.**

**Max length**: 4096 characters

## Response Parameters

**result** `object` *required*

Standard result object with `resultCode`, `resultStatus`, `resultMessage`

**userInfo** `object`

User open information (`userId`, `loginIdInfos`, `status`, `nickName`, `userName`, `avatar`, `gender`, `birthday`, `nationality`, `contactInfos`, `extendInfo`), limited to the granted scopes.

## Result Handling

| resultStatus | Meaning |
| - | - |
| `S` | The inquiry succeeded; use the access token to access the corresponding user resource scope |
| `F` | The inquiry failed; see the result code |
| `U` | Unknown exception on the wallet side; you may retry |

## Result Codes

| resultStatus | resultCode | Description |
| - | - | - |
| `S` | `SUCCESS` | Success |
| `U` | `UNKNOWN_EXCEPTION` | Unknown error occurred |
| `U` | `REQUEST_TRAFFIC_EXCEED_LIMIT` | Rate limit exceeded |
| `F` | `PROCESS_FAIL` | General business failure. Do not retry |
| `F` | `PARAM_ILLEGAL` | Illegal parameters |
| `F` | `ACCESS_DENIED` | Access denied |
| `F` | `INVALID_API` | API invalid or not active |
| `F` | `INVALID_ACCESS_TOKEN` | Access token is invalid |
| `F` | `INVALID_AUTH_CLIENT` | Auth client ID is invalid |
| `F` | `EXPIRED_ACCESS_TOKEN` | Access token has expired |
| `F` | `EXPIRED_AGENT_TOKEN` | Mini Program access token expired |
| `F` | `INVALID_AGENT_TOKEN` | Mini Program access token invalid |

## Sample

### Request

```json theme={null}
{
  "accessToken": "281010033AB2F588D14B43238637264FCA5AAF35xxxx",
  "extendInfo": "{\"customerBelongsTo\":\"siteNameExample\"}"
}
```

### Response

```json theme={null}
{
  "result": {
    "resultCode": "SUCCESS",
    "resultStatus": "S",
    "resultMessage": "success"
  },
  "userInfo": {
    "userId": "1000001119398804xxxx",
    "loginIdInfos": [
      {
        "loginId": "1116874199xxxx",
        "loginIdType": "MOBILE_PHONE",
        "extendInfo": "{}"
      }
    ],
    "status": "ACTIVE",
    "nickName": "Jack",
    "userName": {
      "firstName": "Jack",
      "lastName": "Sparrow"
    },
    "avatar": "https://example.com/avatar.htm?avatarId=FBF16F91-28FB-47EC-B9BE-27B285C23CD3xxxx",
    "gender": "MALE",
    "birthday": "2020-07-25",
    "nationality": "IT",
    "contactInfos": [
      {
        "contactNo": "1116874199xxxx",
        "contactType": "MOBILE_PHONE",
        "extendInfo": "{}"
      }
    ],
    "extendInfo": "{}"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.