Email Authentication

Send Email OTP

Send an OTP to the user's email address. Check out the Email auth template script for more details.

POST
/api/oc/v1/authenticate/email

Request Body

application/jsonRequired
dataRequiredobject
client_signatureRequiredstring

Signature of data using eth_sign

typeRequiredstring
Value in: "ethsign"
curl -X POST "https://sandbox-api.okto.tech/api/oc/v1/authenticate/email" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "email": "[email protected]",
      "client_swa": "0x15256FEB5fAea1662Ce9A3fB8A46237B81b6Dfb1",
      "timestamp": 1744100955808
    },
    "client_signature": "0x7bbaaa8298be149cad8fd4d08802d7f5d8042aefd50a52bfa38b41129c9f986b50a8b599666f0583ec190d80845590a22670708b7c893f356112992cbd6fcf941c",
    "type": "ethsign"
  }'

OTP resent successfully

{
  "status": "success",
  "data": {
    "status": "success",
    "message": "email otp sent",
    "code": 200,
    "token": "a25cd3c7-fefe-58cd-96ab-a4897e13c829",
    "trace_id": "a71fd63da0cb92a19e613a67c888b1f3"
  }
}