Rawi

API reference · Settings

Confirm it's you: verify the code (get reauth_token)

post/settings/reauth/verify
AuthenticationCustomer token (Bearer)
AccessFree user · Pro user

Customer token (Bearer) — free and paid users

Rate limit10/1min

Request body

FieldTypeDescription
code*stringthe 6-digit code
Examplejson
{
  "code": "{{devCode}}"
}

Responses

200

FieldType
reauth_token*string
expires_in*integer
json
{
  "reauth_token": "…",
  "expires_in": 600
}

401 — Missing/invalid token

FieldType
message*string
codestring
json
{
  "message": "Please sign in to continue; your session has ended or is not valid.",
  "code": "unauthenticated"
}

422 — Wrong, expired or used-up code (errors.code)

FieldType
message*string
errors*object
json
{
  "message": "",
  "errors": {
    "email": [
      "ایمیل معتبر نیست."
    ]
  }
}

429 — Rate limit or login-code resend cooldown. Headers: Retry-After, X-RateLimit-*.

FieldTypeDescription
message*string
resend_inintegerSeconds until a new login code may be requested (login-code cooldown only).
json
{
  "message": "Too Many Attempts.",
  "resend_in": 0
}

curl example

bash
curl -X POST 'http://127.0.0.1:8010/api/settings/reauth/verify' \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $RAWI_USER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "{{devCode}}"
}'

Try it in the console