User-related API environment
Pre-live user-related API docs
These pages describe the Pre-live user-related API stack.
Use pre-live OAuth credentials, pre-live API base URLs, and pre-live app URLs when following this documentation. Keep your OAuth flow, API requests, callback URLs, and manual testing within the pre-live environment.
- Use prelive.quran.com for auth-related testing.
- Use prelive.quranreflect.org for Quran Reflect paths where applicable.
- Do not mix production sessions or production user data with pre-live testing.
Get a CSRF token for authenticated user actions
Issues a request token bound to the authenticated browser session. Fetch it with credentials enabled immediately before a Connected Apps lifecycle action, retain the _csrf cookie from this response, and send the JSON token in the X-CSRF-Token header with the retained cookies.
- 200
- 401
- 503
A non-cacheable CSRF token for the current authenticated browser session.
Response Headers
Cache-Control string
Example: private, no-storePrevents browsers and intermediaries from caching the token response.
Set-Cookie string
Example: _csrf=OPAQUE_SECRET; Path=/; SameSite=LaxSets the opaque _csrf secret cookie required with the X-CSRF-Token header. Retain it for the lifecycle request.
Schema
Possible values: [true]
data object required
{
"success": true,
"data": {
"csrfToken": "string"
}
}
{
"success": true,
"data": {
"csrfToken": "string"
}
}
A valid Quran.com user session is required.
Session ban-status verification is temporarily unavailable.
Schema
Possible values: [false]
error object required
details object
{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": {}
}
}
{
"success": false,
"error": {
"code": "app_state_unavailable",
"message": "App State authentication is temporarily unavailable."
}
}