Skip to main content
Most Core API responses include an action field. The principle of implementing an authorization server with Authlete is simple: call a Core API, parse the response, check the value of action, and process accordingly.
You NEVER use the value of resultCode as a condition of processing.
Each Core API defines its own set of actions, but the values fall into two patterns β€” actions that map directly to an HTTP response to the client, and actions that require a second Authlete API call: This page walks through the actions of the /auth/authorization API to show how the model works, then introduces representative actions you will encounter in other Core APIs β€” the lists on this page are not exhaustive, so always consult the API reference of the API you are calling.

Actions of /auth/authorization

A response from the /auth/authorization API contains one of the following values in the action field: Besides action, the response also carries the information your authorization server needs to build the authentication and consent page β€” such as the client’s display information and the requested scopes and claims. See the API Reference for the full response schema.

Mapping Actions to HTTP Responses

Most actions correspond one-to-one to an HTTP response your server returns to the client, built from responseContent. For example, when the response from the Authlete Core API contains action of BAD_REQUEST, your authorization server returns a response like the following to the client:
And when action is LOCATION:

Actions That Need More Steps

INTERACTION and NO_INTERACTION β€” along with grant-processing actions such as PASSWORD, TOKEN_EXCHANGE, and JWT_BEARER β€” cannot be completed by returning a single HTTP response. Your server needs to do its own work, such as authenticating the user and obtaining consent, and then call a second Authlete API to finish the processing. This pattern is explained in Two-Step API Calls.

Representative Actions in Other APIs

Other Core APIs follow the same convention with their own action sets. The following are representative actions β€” not an exhaustive list:
Newer APIs (e.g. /vci/*, /gm) distinguish where an error originates: CALLER_ERROR means the request from your implementation is wrong, while AUTHLETE_ERROR indicates an error inside Authlete.