Endpoint
https://api.usesticker.com
Staging/Sandbox URL: https://staging.api.usesticker.com
Description
Creates an authentication session for a user to access the embedded Sticker iframe. Returns a secure, time-limited session token and the iframe embed URL. Workflow:- Partner authenticates with API key
- Partner provides
internal_user_idorprofile_idto identify the user - Sticker finds the profile and validates it belongs to the partner
- Sticker generates a temporary session token (5 minute expiry, single-use)
- Returns session token + complete iframe embed URL
Authentication
Requires Partner API key in theX-API-Key header:
Request Body
You must provide eitherinternal_user_id OR profile_id:
Request Parameters
Your internal identifier for the user (provided during organization setup). Either this OR
profile_id is required.Sticker’s unique identifier for the user profile (UUID). Either this OR
internal_user_id is required.Using
internal_user_id is recommended as it uses your system’s identifiers and doesn’t require storing Sticker profile IDs.Response
Success Response (200 OK)
Response Fields
Whether the handshake succeeded.
Secure, time-limited token for authenticating the user in the iframe. 64-character hex string.
Complete URL to embed in an iframe. Includes the partner ID and session key already appended.
ISO 8601 timestamp when the session token expires. Tokens expire 5 minutes after generation.
Basic profile information for the authenticated user.
Sticker’s unique identifier for the profile (UUID).
User’s first name.
User’s last name.
User’s email address.
Error Responses
400 Invalid Request
400 Invalid Request
- Neither
internal_user_idnorprofile_idprovided - Invalid UUID format for
profile_id
401 Unauthorized
401 Unauthorized
404 Profile Not Found
404 Profile Not Found
internal_user_id or profile_id is correct.400 Profile Not Set Up
400 Profile Not Set Up
500 Session Creation Failed
500 Session Creation Failed
Session Token Properties
Session tokens have specific security properties:| Property | Description |
|---|---|
| Single-use | Invalidated immediately after first use |
| Time-limited | Expires 5 minutes after generation |
| User-bound | Tied to a specific user profile |
| Partner-bound | Can only be used with the partner’s iframe URL |
| Secure | 64-character cryptographically random hex string |
Code Examples
Using the Session Token
After receiving the handshake response, embed the iframe using theiframe_embed_url:
Best Practices
Generate on Demand
Generate on Demand
Create session tokens only when the user clicks to open the supplies module. Don’t pre-generate tokens.
Handle Expiration
Handle Expiration
If the iframe fails to load (e.g., user’s connection is slow), generate a fresh token and retry.
Never Cache
Never Cache
Don’t store or cache session tokens. They’re single-use and short-lived.
Server-Side Only
Server-Side Only
Always call the handshake endpoint from your backend. Never expose your API key in client-side code.
Error Recovery
Error Recovery
If the handshake fails, show an error message and offer a retry button that generates a new token.

