Overview
This API retrieves a user token by validating the user's email address and password. The returned user token is required to authenticate subsequent TestGrid API requests.
Endpoint
URL - https://{your_base_url}.testgrid.io/api/get-usertoken
Method - POST
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | Registered user email address | |
| password | String | Yes | User account password |
Example Request
curl --location 'https://{your_base_url}.testgrid.io/api/get-usertoken' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'email=USER_EMAIL' \
--data-urlencode 'password=USER_PASSWORD'
Success Response
{
"success": true,
"message": "User Token Fetched.",
"user_id": "21",
"email": "user@testgrid.io",
"user_token": "********"
}
Failure Response
{
"success": false,
"message": "Email and/or password does not match!"
}
Outcome
A valid user token is generated and can be used to authenticate future API requests.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article