Overview
POST/oauth/signin/exchangeoauth

Trade a single-use exchange code → token + refreshToken + user

Create a record in exchange.

Request body

application/json · optional

  • codestring
Example
{
  "code": "string"
}
Responses
200

token + refreshToken + user

  • tokenstring

    JWT access token (Bearer credential)

  • refreshTokenstring

    Opaque refresh token (rotated on use)

  • userUser
Example
{
  "token": "string",
  "refreshToken": "string",
  "user": {
    "id": "string",
    "email": "string",
    "name": "string",
    "avatarUrl": "string",
    "slug": "string",
    "publicProfileEnabled": true,
    "capabilities": [
      "string"
    ]
  }
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/oauth/signin/exchange" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "string"
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/oauth/signin/exchange", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"code\": \"string\"\n}",
});
const data = await res.json();