---
title: "Get a buyer token"
method: POST
path: "/enterprise-auth"
tags: ["Buy"]
---

# Get a buyer token

`POST /enterprise-auth`

## Request

- Base URL: `https://api.opedd.com`
- URL: `https://api.opedd.com/enterprise-auth`
- Auth: none required

Two uses. Exchange the access key of a paid order: `{"access_key": "ent_…", "buyer_email": "…"}` returns `token` (`opedd_buyer_live_…`, valid 30 days), `expires_at`, `publisher_ids` and `valid_until`. Or get a free sandbox token: `{"action": "create_sandbox", "buyer_email": "…"}` returns `sandbox_token` (`opedd_buyer_test_…`), limited to 3 per email per day.

## Request body

- union
  - object
    - `action` 'create_sandbox', required: Must be `create_sandbox`
    - `buyer_email` string, email, required
    - `buyer_org` string
  - object
    - `access_key` string, required: Enterprise access key (ent_xxx)
    - `buyer_email` string, email, required

## Response `200`

Sandbox: returns `opedd_buyer_test_<32-hex>` token. Production: returns `opedd_buyer_live_<32-hex>` bearer token + publisher list.

## Other responses

- `401`: Invalid access key
- `403`: License inactive, expired, or email mismatch
- `429`: Rate limit exceeded (5/hr auth, 3/day sandbox)

---

[API](https://skmtc.dev/opedd/apis/opedd-api.md) · [All operations](https://skmtc.dev/opedd/apis/opedd-api/llms.txt) · [OpenAPI document](https://skmtc.dev/opedd/apis/opedd-api/revisions/a33336810cf0?raw)
