Get started

Sections

Theme switcher

Get a one-use link that signs a user in to your white-label site.

Header Parameters

Authorizationstring

Body Parameters

UIDstring Required

The user's UID, as sent to addNewUser. The user must be active.

Max length
128
redirectstring

Optional. A path on your site, starting with a single /, to open after sign-in. Full URLs are refused.

Max length
300

Response

200
Object

A sign-in link.

Response Attributes

responseinteger
login-urlstring

The sign-in link on your site. Redirect the user to it straight away.

expires-ininteger

Seconds until the link stops working (about 120).

single-useboolean

Always true.

400
Object

uid_required: UID is missing. redirect_invalid: redirect is not a path on the site.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.

error-codestring

Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

401
Object

Authentication failed. The body is {"status": false, "message": ...} with one of: Access denied - token missing (no Authorization: Bearer header), Unauthorized - Invalid or expired token (bad or expired token; tokens live 10 hours), or Token expired - request a new token (Spendstream revoked your tokens). In every case call getToken again.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.

error-codestring

Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

statusboolean
403
Object

sso_not_enabled: login links are not switched on for your publisher. member_not_active: the user is inactive.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.

error-codestring

Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

404
Object

member_not_found: no user with this UID belongs to your publisher, or the site does not know the user.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.

error-codestring

Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

422
Object

site_not_configured: your white-label site is not set up for login links yet. Contact Spendstream.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.

error-codestring

Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

429
Object

rate_limited: more than 10 links a minute for this user, or 300 for your publisher.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.

error-codestring

Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

502
Object

site_bad_answer: the site answered with something that is not a sign-in link. No link was issued; try again, and contact Spendstream if it keeps happening.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.

error-codestring

Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

503
Object

site_unavailable: the site could not make a link right now. Try again, or fall back to the /login/{token} link.

Response Attributes

messagestring

Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.

error-codestring

Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.

errorstring

Alternative error message field used by a subset of endpoints (notably getToken and authentication failures). Integrators should check for both message and error when parsing failure responses.

responseinteger

Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on most error paths; a few auth-layer failures omit it.

Was this section helpful?

POST

/

Select
1

Response

Was this section helpful?