Change a browser login code into tokens

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-docs.kitsu.cloud/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Kitsu API MCP server": {
    "url": "https://api-docs.kitsu.cloud/mcp"
  }
}

Close
POST /auth/app-login/token

Change a one-time browser login code into a new pair of access and refresh tokens. You can use a code one time only. The code verifier must agree with the PKCE challenge of the code. The response has the same shape as the response of a login. This route does not set cookies. The organisation has the chat tokens only for an administrator.

application/json

Body Required

  • code string Required

    One-time login code

    Minimum length is 1, maximum length is 128.

  • code_verifier string Required

    PKCE code verifier (43 to 128 characters)

    Format should match the following pattern: ^[A-Za-z0-9._~-]{43,128}$.

Responses

  • 200 application/json

    The user, the organisation and the two tokens

    Hide response attributes Show response attributes object
    • login boolean
    • user object
    • organisation object
    • access_token string
    • refresh_token string
  • 400

    The code is unknown, expired or used, the verifier is not correct, or the user is inactive

POST /auth/app-login/token
curl \
 --request POST '/api/auth/app-login/token' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{
  "code": "string",
  "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
}'
Request examples
{
  "code": "string",
  "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
}
Response examples (200)
{
  "login": true,
  "user": {},
  "organisation": {},
  "access_token": "string",
  "refresh_token": "string"
}