Login APIs
Click an API to expand/collapse it.
- Description
-
This is the login call that:
- Accepts the email id and password to authenticate in the request body.
- Provides a successful auth/error message.
-
Provides a relevant user id and also one of the following user roles:
"OPERATOR_USER"
"PUBLISHER_USER"
"REVIEWER_USER"
- Request Endpoint
- POST https://<Example api server address>/login/devportal
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"email\": \"f19ec2c2af3e4034bf93e51e24064585@gmail.com\",
\"password\": \"password1\"
}" \
'https://impk.ntg.Example.net/login/devportal'
- POST body attributes (JSON)
-
Attribute |
Type |
Use |
Description |
email |
String |
Required |
The user email id. |
password |
String |
Required |
The user password. |
- POST body
-
Headers: Content-Type: application/json
{
"email": "f19ec2c2af3e4034bf93e51e24064585@gmail.com",
"password": "password1"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyZmQ3N2UxOS04NGI2LTQ2ZGYtYmViMi1kMjg0NDYxMWE4MGMiLCJpYXQiOjE0NzYyNzc0NzQsInN1YiI6InB1Ymxpc2hlciIsImlzcyI6ImJldGNhZGUtY29yZSIsImxhbmciOiJlbiIsInJvbGUiOiJQVUJMSVNIRVJfVVNFUiIsImV4cCI6MTQ3NjI4NDY3NH0.jzhkiRf1cR8vbW25WygvdEFAj7zTYHbck2TYABlUSm4",
"refreshToken": "45a1c9b66d1df306e02819a9c4252db926b2550b6233dd0fe166b2cea4bfac18",
"name": "xwmtsMyEYc",
"id": "2fd77e19-84b6-46df-beb2-d2844611a80c",
"roles": [
"PUBLISHER_USER"
]
},
"detail": null,
"error": false,
"message": "Devportal user login successful"
}
Return to top