Skip to content

Menu

POST /api/auth/get-access-token

No operationId in openapi.json · page id post-api-auth-get-access-token

Get a valid access token, doing a refresh if needed

Authentication

Signed-in operator session (browser)

Actual native human session; protected management also requires recent successful factor authentication.

Request body

application/json

one of:

  • object
    • accountIdstringrequired

      The Better Auth account ID

    • userIdstring

      The user ID associated with the account

  • object
    • useAccountCookietruerequired

      Select the current OAuth account from its signed cookie

    • userIdstring

      The user ID associated with the account

Responses

200 A Valid access token

  • tokenTypestring
  • idTokenstring
  • accessTokenstring
  • accessTokenExpiresAtstring (date-time)

400 Invalid refresh token or provider configuration

401 Unauthorized. Due to missing or invalid authentication.

  • messagestringrequired

403 Forbidden. You do not have permission to access this resource or to perform this action.

  • messagestring

404 Not Found. The requested resource was not found.

  • messagestring

429 Too Many Requests. You have exceeded the rate limit. Try again later.

  • messagestring

500 Internal Server Error. This is a problem with the server that you cannot fix.

  • messagestring

All operations

POST /api/auth/get-access-token · AgentLand