# Identities

Temporary identity endpoints used for auto-login flows

## Create identity (Signed Fetch)

> Creates a temporary identity used for auto-login.  \
> This endpoint requires a Signed Fetch request per ADR-44. Requests signed by scenes are rejected.<br>

```json
{"openapi":"3.1.0","info":{"title":"Auth Server API","version":"1.0.0"},"tags":[{"name":"Identities","description":"Temporary identity endpoints used for auto-login flows"}],"servers":[{"url":"https://auth-api.decentraland.org","description":"Production server"},{"url":"https://auth-api.decentraland.zone","description":"Development server"},{"url":"http://localhost:{port}","description":"Local development server (replace {port} with your local port, typically 3000)","variables":{"port":{"default":"3000","description":"Local development server port"}}}],"security":[],"paths":{"/identities":{"post":{"tags":["Identities"],"summary":"Create identity (Signed Fetch)","description":"Creates a temporary identity used for auto-login.  \nThis endpoint requires a Signed Fetch request per ADR-44. Requests signed by scenes are rejected.\n","operationId":"createIdentity","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identity":{"type":"object","properties":{"expiration":{"type":"string","format":"date-time"},"ephemeralIdentity":{"type":"object","properties":{"address":{"type":"string","description":"Ephemeral wallet address"},"publicKey":{"type":"string","description":"Ephemeral wallet public key"},"privateKey":{"type":"string","description":"Ephemeral wallet private key"}},"required":["address","publicKey","privateKey"]},"authChain":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Auth link type (e.g., SIGNER, ECDSA_EPHEMERAL)"},"payload":{"type":"string","description":"Link payload"},"signature":{"type":"string","description":"Link signature"}},"required":["type","payload","signature"]},"description":"Authentication chain for signature validation (from @dcl/schemas)","minItems":1}},"required":["expiration","ephemeralIdentity","authChain"]}},"required":["identity"],"additionalProperties":false}}}},"responses":{"201":{"description":"Identity created","content":{"application/json":{"schema":{"type":"object","properties":{"identityId":{"type":"string","format":"uuid","description":"Unique identity identifier"},"expiration":{"type":"string","format":"date-time","description":"Identity expiration time (ISO 8601)"}},"required":["identityId","expiration"]}}}},"400":{"description":"Invalid request or auth chain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong"}},"required":["error"]}}}},"401":{"description":"Ephemeral key expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong"}},"required":["error"]}}}},"403":{"description":"Authorization mismatch or invalid signer","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong"}},"required":["error"]}}}}}}}}}
```

## Retrieve and consume identity

> Retrieves an identity by ID for auto-login.  \
> The identity is deleted after a successful retrieval.  \
> The request must originate from the same IP (flexible matching) used when creating the identity.<br>

```json
{"openapi":"3.1.0","info":{"title":"Auth Server API","version":"1.0.0"},"tags":[{"name":"Identities","description":"Temporary identity endpoints used for auto-login flows"}],"servers":[{"url":"https://auth-api.decentraland.org","description":"Production server"},{"url":"https://auth-api.decentraland.zone","description":"Development server"},{"url":"http://localhost:{port}","description":"Local development server (replace {port} with your local port, typically 3000)","variables":{"port":{"default":"3000","description":"Local development server port"}}}],"security":[],"paths":{"/identities/{id}":{"get":{"tags":["Identities"],"summary":"Retrieve and consume identity","description":"Retrieves an identity by ID for auto-login.  \nThe identity is deleted after a successful retrieval.  \nThe request must originate from the same IP (flexible matching) used when creating the identity.\n","operationId":"getIdentity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Identity ID"}],"responses":{"200":{"description":"Identity retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"identity":{"type":"object","properties":{"expiration":{"type":"string","format":"date-time"},"ephemeralIdentity":{"type":"object","properties":{"address":{"type":"string","description":"Ephemeral wallet address"},"publicKey":{"type":"string","description":"Ephemeral wallet public key"},"privateKey":{"type":"string","description":"Ephemeral wallet private key"}},"required":["address","publicKey","privateKey"]},"authChain":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Auth link type (e.g., SIGNER, ECDSA_EPHEMERAL)"},"payload":{"type":"string","description":"Link payload"},"signature":{"type":"string","description":"Link signature"}},"required":["type","payload","signature"]},"description":"Authentication chain for signature validation (from @dcl/schemas)","minItems":1}},"required":["expiration","ephemeralIdentity","authChain"]}},"required":["identity"]}}}},"400":{"description":"Invalid identity format","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong"}},"required":["error"]}}}},"403":{"description":"IP address mismatch","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong"}},"required":["error"]}}}},"404":{"description":"Identity not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong"}},"required":["error"]}}}},"410":{"description":"Identity expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message describing what went wrong"}},"required":["error"]}}}}}}}}}
```
