post https://api.staging.vendy.money/auth
Request:
Field | Type | Description |
---|---|---|
AccessKey | string | A public unique identifier can be found on the dashboard |
SecretKey | string | A secret key used to authenticate you, can be found on the dashboard |
Example Request
curl --location 'https://api.vendy.money/auth' \
--header 'AccessKey: *******' \
--header 'Content-Type: application/json' \
--header 'SecretKey: *******' \
--data '{}'
Response:
Field | Type | Description |
---|---|---|
token | string | The JWT to be used for subsequent requests |
expiryTime | string | A time after which the token will become invalid |
Example response
{
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJqd3RpZCI6IjEyOTM5MTA2LTgwMzgtNGZjNi04ZmFmLTBkNzJhY2VkNTQ3YyIsImlhdCI6MTY4NzQ3Mjk1MSwiZXhwIjoxNjg4NjgyNTUxLCJpc3MiOiJodHRwczovL3ZlbmR5Lm1vbmV5LmNvbS8iLCJqdGkiOiIxMjkzOTEwNi04MDM4LTRmYzYtOGZhZi0wZDcyYWNlZDU0N2MifQ.ps3IGxdlRIr4IFeKtFHEhTW0Mza2BmUwksL6bMAsn9PEikq2JT1vFCdavTlOkf6wXY2LDxXEzWwrz7Blj39yJ-hwrug773qHq7Bk2anFHQJwasKi5qFL9iDliLyic097099sTw70KFZheVepTmflQOYcsKNQ-jJN7lFijDKs1WE",
"expiryTime": "Thu, 06 Jul 2023 22:35:51 GMT"
}
Possible errors:
Error Code | Description |
---|---|
400 (Bad request) | The user failed to enter a password and receives an error message that says "data invalid." Required fields were invalid, and not specified. |
401 ( Unauthorized) | The user inputs an incorrect password and receives an error message that says "incorrect password". |
401 (Unauthorized) | The user is unable to activate their accounts and receives an error message stating "Account has not been activated. Check your email for instructions on how to activate it!" |