Skip to the content
Documentation

Authentication

No ratings yet

Every content call of the REST API runs as a user of the site, and is checked against that user's roles and policies. With the shipped rest.ini [Authentication] RequireAuthentication=enabled a call needs one of these credentials:

  • OAuth 2.0 access token: For: an application that lets other users sign in and act for them; Sent as: Authorization: Bearer <token> or Authorization: OAuth <token>
  • Personal API key: For: a script or integration of the user's own; Sent as: Authorization: Bearer expk_...
  • User name and password: For: only with AuthenticationStyle=ezpRestBasicAuthStyle; Sent as: HTTP basic authentication

A key or token stops working when its user is disabled or locked. A key is also limited to its scopes, and never goes beyond the owner's policies.

The REST applications page of the Exponential 6 administration under oAuth admin, with counts of applications, authorizations, tokens and API keys and the New application button

Setup > oAuth admin (/oauthadmin/list): register REST applications for OAuth 2.0; the API keys tab lists and revokes personal API keys.

The pages of this section

Two-step sign-in

With basic authentication, an account for which the site requires a second step signs in with its password alone, unless the site opts the REST path in (sevenxauthentication2fa.ini [OtherSignInPaths] Guard[]=rest); then it needs an app password, an API key or an OAuth token. See Second factor on other sign-in paths.

Related pages

In this section

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.