# Retrieve Caller Information

Use /openapi/profile to verify the Access Token, endpoint registration, and application grant.

import ApiDebugger from '../../../../components/ApiDebugger.astro';

## Endpoint information

| Item | Value |
| --- | --- |
| Method | `GET` |
| Request URL | `https://backend.biotech-mkt.com/openapi/profile` |
| Path | `/openapi/profile` |
| Authentication | Bearer Access Token |
| Permission | Endpoint must be enabled and granted to the application |
| Rate limit | Configured per application and endpoint |

<ApiDebugger preset="profile" lang="en" />

This diagnostic endpoint returns the application and request context associated with the current Access Token.

## Request parameters

An Access Token is required. A platform administrator must also register and enable this endpoint and grant it to the current application.

This endpoint has no query parameters or request body. Send the following header:

| Header          | Type   | Required | Description             |
| --------------- | ------ | -------- | ----------------------- |
| `Authorization` | string | Yes      | `Bearer <access_token>` |

## Request example

```bash
curl "https://backend.biotech-mkt.com/openapi/profile" \
  --header "Authorization: Bearer $OPENAPI_ACCESS_TOKEN"
```

## Response fields

| Field               | Return type | Description                                  |
| ------------------- | ----------- | -------------------------------------------- |
| `code`              | integer     | Business status code; `200` on success       |
| `message`           | string      | Response message                             |
| `data`              | object      | Caller context                               |
| `app_id`            | integer     | Internal OpenAPI application ID              |
| `app_key`           | string      | App Key of the current application           |
| `app_name`          | string      | Current application name                     |
| `token_id`          | integer     | Internal token record ID, not the full token |
| `access_expires_at` | string      | Absolute Access Token expiration time        |
| `request_method`    | string      | Current request method                       |
| `request_path`      | string      | Current request path                         |

## Response example

```json
{
  "code": 200,
  "message": "Success",
  "data": {
    "app_id": 1,
    "app_key": "ak_xxx",
    "app_name": "Order Data Application",
    "token_id": 12,
    "access_expires_at": "2026-08-27 12:00:00",
    "request_method": "GET",
    "request_path": "/openapi/profile"
  }
}
```

## Errors and rate limits

This endpoint can return `401`, `403`, `404`, `405`, `429`, or `503`. Limits are counted independently by application ID and endpoint ID. See [Errors and Rate Limits](/en/guides/errors-rate-limits) for response headers and handling guidance.

## Integration acceptance

For an initial integration, verify that:

1. Both the HTTP status and response `code` are `200`.
2. `app_key` matches the application delivered by the administrator.
3. `request_method` is `GET` and `request_path` is `/openapi/profile`.
4. The response includes `X-Request-Id` and the current endpoint rate-limit status headers.
