Authorization header of every request, and
both resolve to the same team, so the rest of the API behaves identically.
Use an API key to get started quickly, or where a single trusted service calls Method. Use OAuth
when you want short-lived credentials that expire on their own, or when you want to restrict an
integration to a subset of the API.
API keys
An API key identifies your team. Secret API keys have the prefixsk_, and your team has a separate
key for each environment. Keys are available under the Keys section in the
Method Dashboard, where you can also rotate them.
API keys do not expire and carry full access to your team, so treat them as sensitive credentials:
store them in a secrets manager, never in client-side code or version control.
Get started by creating your account in the Method Dashboard or
connect with our team.
OAuth
Method supports OAuth 2.0 Client Credentials as an alternative to API keys. You exchange aclient_id and client_secret for a short-lived
access token, then use that token on API requests in place of an API key.
- Create an OAuth client in the Method Dashboard to get a
client_idandclient_secret. - Exchange them at
POST /oauth/tokenfor an access token, valid for 1 hour. - Call the Method API with
Authorization: Bearer <access_token>. - When the token expires, request a new one the same way.
Credentials
Clients and secrets are managed under the OAuth section in the
Method Dashboard, where you can mint new
secrets and disable existing ones. Each environment has its own clients and secrets.
Getting an access token
Send aPOST request to /oauth/token with a application/x-www-form-urlencoded body containing
grant_type=client_credentials. Authenticate with your client credentials using either HTTP Basic
auth or the request body.
Token endpoint errors
The token endpoint uses the standard OAuth error format rather than the Method error envelope.Scopes
Scopes follow<resource>:<action>, where the action maps to the HTTP method:
For example,
entities:read allows GET /entities/… and entities:write allows POST /entities.
Your client is granted a set of scopes by Method. By default a token carries all of them. To
request a token with fewer scopes, pass a space-delimited scope parameter:
400 invalid_scope.
Calling the API with an access token
Send the access token in theAuthorization header. Everything else about the API is unchanged.
- 401 — the token is missing, invalid, expired, or revoked. Request a new token and retry.
- 403 with
sub_type: INSUFFICIENT_SCOPE— the token does not carry the scope this endpoint requires.
Token lifecycle
- Cache the token and reuse it for its full lifetime. Do not request a new token per API call.
- Renew shortly before expiry, for example 60 seconds early, to avoid a
401at the boundary. On an unexpected401, request a new token once and retry. - There are no refresh tokens. This is by design for the client credentials grant
(RFC 6749 §4.4.3). Renewal is the
same
POST /oauth/tokencall again.
The token endpoint is rate limited.
Secret rotation
Rotate yourclient_secret from the Method Dashboard for
routine rotation or suspected exposure. Your client_id never changes.
- Mint a new secret. Both the new and existing secrets remain valid.
- Deploy the new secret on your own schedule, with no downtime.
- Disable the old secret once you have confirmed cutover.