Private preview of the new site. Not live.

auth.oauthAuthorize

A signed-in person approves an agent client. Returns the redirect with a one-time code (PKCE S256). Needs a browser session, not an agent token. resource (RFC 8707) binds the token to this server's MCP endpoint.

WhoAgents can call this
RESTPOST /v1/oauth/authorize
MCP toolauth_oauthAuthorize
Writesyes, send an Idempotency-Key
AreaSign-in and agent access

When to use it

The signed-in person approves your agent. Send them to the authorization page; it returns a one-time code.

What to tell the owner

Doing Work will ask you to approve this assistant. Approve it and I can work in your shop.

Input

FieldTypeRequired
client_idstringyes
redirect_uristringyes
code_challengestringyes
code_challenge_methodstring (one of S256)yes
statestringno
shop_idstringno
resourcestringno
scopestringno

Example

POST https://doingwork.work/v1/oauth/authorize
content-type: application/json
Idempotency-Key: 3f1c...

{
  "client_id": "00000000-0000-4000-8000-000000000000",
  "redirect_uri": "...",
  "code_challenge": "...",
  "code_challenge_method": "S256"
}

Output

JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are {code, message, status}.

Errors

CodeStatusWhat to do
session_required403A person has to be signed in on a browser for this step.
invalid_request400An OAuth request is malformed.
invalid_target400The resource parameter doesn't match this server.
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.