User Authentication API
User Authentication API Documentation
Get User Session Link
Generates a login session link for a specified user. This endpoint requires a Blaze Team Advanced or White Labeling subscription.
Endpoint
GET https://us-central1-querycomposer.cloudfunctions.net/user_authentication_api
Authentication
- Requires a valid API key passed as a query parameter
- Must have an active Blaze Team Advanced or White Labeling subscription
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
api_key | Yes | string | Your API authentication key |
user_email | Yes | string | URL encoded email address of the user to generate link for |
hide_sidebar | No | string | When set to "true", the sidebar will be hidden for the user. Default is "false" |
Example Request
GET https://us-central1-querycomposer.cloudfunctions.net/user_authentication_api?user_email=user%40example.com&api_key=your_api_key_here&hide_sidebar=true
URL Encoding
The email address must be URL encoded. Common encodings include:
- @ becomes %40
- . remains as .
- + becomes %2B
- spaces become %20
Example encodings:
- user@example.com → user%40example.com
- first.last@example.com → first.last%40example.com
- user+label@example.com → user%2Blabel%40example.com
Responses
Success Response
- Status Code: 200
- Content: Login link for the specified user
{
"login_link": "https://..."
}
Error Responses
Invalid Request - Missing API Key
- Status Code: 400
- Content: "Invalid request, missing API key"
Invalid API Key
- Status Code: 403
- Content: "Invalid API key"
Insufficient Subscription
- Status Code: 403
- Content: "Authentication API Require Blaze Team Advanced or White Labeling Subscription"
Missing Required Parameter
- Status Code: 400
- Content: "Invalid request, missing user_email"
User Not Found
- Status Code: 404
- Content: "User not found"
User Not in Team
- Status Code: 404
- Content: "This user is not in your team"
Server Error
- Status Code: 500
- Content: Error message string
Usage Restrictions
The API key must be associated with an account having Blaze Team Advanced or White Labeling subscription
The requested user must belong to the same team as the API key owner
The user must exist in the system
Security Notes
- API keys should be kept secure and never exposed in client-side code
- All requests should be made over HTTPS
- Each API key should only be used for a single application or service
- Ensure proper URL encoding of email addresses to prevent request errors
Updated on: 10/12/2024
Thank you!