Start browser sign-in (redirects to the identity provider)
const url = 'https://example.com/v1/auth/login?locale=en';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/auth/login?locale=en'Redirects to the identity provider. On failure redirects to
/?login_error=, where code is one of unreachable, unknown_provider,
busy, internal.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Local path to return to after sign-in, e.g. /
Go straight to this provider (one of /v1/auth/config providers)
A language Affectra is available in
The app’s language; the identity provider gets it as ui_locales. Other values are ignored.
Responses
Section titled “Responses”Redirect to the identity provider, or back to the web app on failure
Browser sign-in is not configured
Over the operation’s rate-limit budget (x-affectra-budget): code request.rateLimited with params.budget. Wait Retry-After seconds before trying again.
Every error answer, Content-Type
application/problem+json. The web app and integrations translate code; detail is English,
for people reading curl output or CI logs, and may change wording at
any time. Match on code, never on detail.
object
The HTTP status
Stable error codes. A code is never renamed; new ones may be added, so
a client falls back to detail for a code it doesn’t know. Another
organization’s object answers notFound, the same as a missing one.
What went wrong
Values the code’s message needs, e.g. {“field”: “version”}. Only values the caller sent or may see. Empty when the message needs none.
object
Example
{ "code": "notFound"}Headers
Section titled “Headers”Seconds until a request would be allowed again, at least 1