Login With OTP

This API is for logging into the user account


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/creators
GRAPHQLstringQUERY
content-typestringJSONapplication/json

Request

{
  login_with_otp(email: "sachinsuresh704@gmail.com", otp: "12345") {
    message
    token
  }
}


Request Parameters

FieldsTypeDescriptionRequired
emailstringemail of the user
otpstringOTP received in the email

Success

{
    "data": {
        "login_with_otp": {
            "message": "Login success",
            "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyMjk5YzkyNTRmNmMyYmNkNGIyZjA5YSIsIm5hbWUiOiJTYWNoaW4gVCBTIiwiYWNjb3VudFR5cGUiOiJjcmVhdG9yIiwiaWF0IjoxNjUyMzMxMjg1LCJleHAiOjE2NTIzNTI4ODV9.W3iuq0X7mSCQTC7c4D38rXIe5NgX0A6LgoIxoMwoJAo"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Incorrect OTP",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["login_with_otp"]
        }
    ],
    "data": {
        "login_with_otp": null
    }
}