API reference · Auth & profile
Sign-in options
get
/auth/options| Authentication | None (public) |
|---|---|
| Access | Guest · Free user · Pro user · Consultant · Super admin Public — no token |
Which sign-in methods the app shows. phone_login = setting sms.login_enabled on and codes can be delivered (IPPanel configured, or the log driver outside production); voice_fallback = sms.otp_voice_fallback on and voice available. panel_languages = the panel languages switched on in the admin panel (fa/en, in the admin panel order); the language switcher offers only these and hides itself when just one is on. Market & calendar: market (international or iran, from RAWI_MARKET), default_locale (panel language for a visitor who has not picked one), calendar (gregorian or jalali, period boundaries only) and timezone (IANA; the zone dates are displayed in).
Responses
200 — AuthOptions
| Field | Type | Description |
|---|---|---|
phone_login* | boolean | |
voice_fallback* | boolean | |
panel_languages* | any[] | O1 language switcher: panel languages switched on in A4 (that the app has a dictionary for). |
market* | string | Market & calendar (A «بازار و تقویم»): calendar decides period boundaries only (monthly allowances reset
on the 1st of a Gregorian or Persian month in timezone); dates are displayed by the reader's locale. |
default_locale* | string | |
calendar* | string | |
timezone* | string |
json
{
"phone_login": true,
"voice_fallback": false,
"panel_languages": [
"fa",
"en"
],
"market": "international",
"default_locale": "en",
"calendar": "gregorian",
"timezone": "UTC"
}
curl example
bash
curl -X GET 'http://127.0.0.1:8010/api/auth/options' \
-H 'Accept: application/json'