# Identity

Who the credentials belong to.

## Endpoints

-   [GET `/v2/me`](https://public-api.dapi.digital/docs/reference/identity.md#get_me)

## The actor object

Who the current credentials belong to.

### Attributes

-   `object` (string): Names the type of this object. Always `actor`.
-   `user_id` (string): Id of the account the credentials belong to.
-   `kind` (string):
    
    -   `designer`: a seller on 3DAPI, using the API for their own store.
    -   `integrator`: a company building on the API through the API dashboard.
    
-   `authenticated_with` (string): `api_key` for the `x-api-key` header, `session` for a signed-in API dashboard user, `oauth` for an app the user connected and approved, such as Claude or ChatGPT.
-   `scopes` (array of string or null): The scopes stored on the API key, as chosen when it was created: per-resource scopes such as `products:read`, or a legacy permission (`full`, `order` or `pricing`). For a connected app, the scopes the user approved. See `effective_scopes` for what they allow. Null for sessions, which are not scoped.
    
    Possible values: `pricing`, `order`, `full`, `products:read`, `products:write`, `orders:read`, `orders:write`, `orders:read_customer`, `stocks:read`, `stocks:write`, `extras:read`, `extras:write`, `qc:read`, `qc:write`, `wallet:read`, `webhooks:read`, `quotes:read`, `quotes:write`.
    
-   `effective_scopes` (array of string or null): What the API key may actually do, as the per-resource scopes operations list in `x-required-scopes`: `scopes` with legacy permissions expanded. `full` gives every scope (customer data included), `order` gives `orders:read` and `orders:write`, `pricing` gives none in this API. Null for sessions, which are not scoped.
    
    Possible values: `products:read`, `products:write`, `orders:read`, `orders:write`, `orders:read_customer`, `stocks:read`, `stocks:write`, `extras:read`, `extras:write`, `qc:read`, `qc:write`, `wallet:read`, `webhooks:read`, `quotes:read`, `quotes:write`.
    
-   `approval` (string or null): Integrators only, null for designers. A `pending` integrator can explore the API; going live needs `approved`.
    
    Possible values: `pending`, `approved`, `rejected`.
    

**The actor object**

```json
{
  "object": "actor",
  "user_id": "44444444-4444-4444-8444-444444444444",
  "kind": "designer",
  "authenticated_with": "api_key",
  "scopes": [
    "order"
  ],
  "effective_scopes": [
    "orders:read",
    "orders:write"
  ],
  "approval": null
}
```

## Identify the current credentials

GET `/v2/me`

- **Credentials**: Any valid API key. A signed-in dashboard session works too.

- **For**: Designers and Integrators

- **Operation id**: `get_me`

Returns who the credentials belong to and what they may do. Call it first to check that an API key works and which scopes it carries.

### Returns 200 OK

The credentials are valid. Returns [the actor object](https://public-api.dapi.digital/docs/reference/identity.md#me_object).

### Responses

-   `200`: The credentials are valid.
-   `401`: Credentials are missing (`missing_credentials`), the API key is unknown or inactive (`invalid_api_key`), the session expired (`invalid_session`), or both a key and a session were sent (`ambiguous_credentials`).
-   `403`: The account may no longer use the API (`account_blacklisted`).
-   `429`: Too many requests (`rate_limited`): the limit is 500 per minute per API key (or signed-in user). Wait for the number of seconds in the `Retry-After` header, then retry; `details` has `limit`, `window_seconds`, `reset_at` and `retry_after_seconds`.

Errors use [the error object](https://public-api.dapi.digital/docs/guides/errors.md#error-object).

**Request**

```bash
curl "https://public-api.dapi.digital/v2/me" \
  -H "x-api-key: $DAPI_API_KEY"
```

---

3DAPI API Docs. This page on the web: https://public-api.dapi.digital/docs/reference/identity. Index of every page: https://public-api.dapi.digital/docs/llms.txt.
