Public
Sessions

Sign in (first-party)

First-party email/password login. Returns a Doorkeeper access token in JSON — same fields as POST /oauth/token with grant_type=password, plus user_id. Does not require client_id / client_secret in the request (the server uses the configured first-party OAuth application). For third-party or strict OAuth clients, call POST /oauth/token on the host root instead (see OAuth tag).

post/users/sign-in

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/users/sign-in
  • Auth: none declared

Request body

Response

Success — Doorkeeper access token; includes user_id for convenience.

access_tokenstring required

Opaque bearer token. Send as header Authorization: Bearer {token} on /api/v1/* routes.

token_typestring required
expires_ininteger

Lifetime of the access token in seconds.

refresh_tokenstring nullable

Present when the client and grant type allow refresh tokens.

scopestring

Granted scopes (space-separated).

user_idstring uuid nullable

Only returned by first-party JSON endpoints (/users/sign-in, /users/access-tokens), not by POST /oauth/token.

actor_idstring uuid nullable

The acting entity's id (first-party endpoints only). Equals user_id today; becomes the Organization id when a token is scoped to act for an organization.

actor_type'User' | 'Organization' nullable

Polymorphic type of actor_id (first-party endpoints only).

Example response

{
  "token_type": "Bearer"
}

Changes

No recorded changes to this operation across all 3 revisions of this API.