Gamma API

Verify a TOTP code

POST
/api/auth/two-factor/verify-totp

Verify two factor TOTP

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Request Body

application/json
  1. body
code*string

The otp code to verify. Eg: "012345"

trustDevice?boolean

If true, the device will be trusted for 30 days. It'll be refreshed on every sign in request within this time. Eg: true

Response Body

Successful response

application/json
  1. response
status?boolean
Example Request
curl -X POST 'http://localhost:3000/api/auth/two-factor/verify-totp' \  -H 'Content-Type: application/json' \  -d '{  "code": "string"}'
Example Response
{  "status": true}