Login

This API is for login to admin account


GRAPHQL


Headers

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

Request

{
  admin_login(email: "nftadmin@gmail.com", password: "nftadmin@123") {
    message
    token
  }
}



Request Parameters

FieldsTypeDescriptionRequired
emailstringemail of the admin
passwordstringpassword of the admin

Success

{
    "data": {
        "admin_login": {
            "message": "Login success",
            "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYWRtaW4iLCJhY2NvdW50VHlwZSI6ImFkbWluIiwiaWF0IjoxNjUyMzI4MjAyLCJleHAiOjE2NTIzNDk4MDJ9.qPBFexWB-bYK3P5o9SvoJIiUABnJJ80baKqfw8Uj6Hw"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "Incorrect email address",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["admin_login"]
        }
    ],
    "data": {
        "admin_login": null
    }
}


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