1dm_sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
dm_sk_ - DealMachine secret key prefixlive_ - All keys are live keys (no test environment)Authorization header using the Bearer scheme:12curl https://api.v2.dealmachine.com/v1/account \ -H "Authorization: Bearer dm_sk_live_xxx"
| Header | Required | Description |
Authorization | Yes | Your API key in Bearer format |
Content-Type | Yes* | application/json for request bodies |
X-Request-Id | No | Your own request ID for distributed tracing |
12345678const response = await fetch('https://api.v2.dealmachine.com/v1/account', { headers: { 'Authorization': `Bearer ${process.env.DM_API_KEY}`, 'Content-Type': 'application/json', }, }); const { data } = await response.json();
1dm_at_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1export DM_API_KEY=dm_sk_live_xxx
12npm install -g dealmachine dm login
~/.dealmachine/config.json.401 Unauthorized error.token_endpoint
returned by /.well-known/oauth-authorization-server. The app-hosted endpoint at
/api/oauth/token accepts JSON string parameters or form-encoded parameters.
It rejects malformed JSON, non-string parameter values and duplicate form fields
with 400 invalid_request. Optional JSON fields may be null.error and error_description. An invalid or revoked grant uses invalid_grant.
A temporary database or infrastructure failure returns HTTP 503,
Retry-After: 2, and this body:1234{ "error": "temporarily_unavailable", "error_description": "Token exchange is temporarily unavailable. Please retry." }
invalid_grant requires a new authorization. Persist each successful
rotated refresh token before attempting another rotation. App-hosted token
responses include Cache-Control: no-store and Pragma: no-cache./v1/oauth/token has its own documented contract.