Initial Authentication
Field
Description
username
Username for your Violet account created on channel.violet.io (this is your email you signed up with)
password
Password for your Violet account you created on channel.violet.io
Making the Login Request
The first call to Violet that needs to be made is the /login call, to authenticate your Violet Account and credentials and retrieve an authentication token.
Endpoint: POST /login
Required Headers:
X-Violet-App-Id: your-app-id-here
X-Violet-App-Secret: your-app-secret-here
Content-Type: application/json
Request Body
{
"username": "[email protected]",
"password": "your-password"
}
Sample Code
curl -X POST https://sandbox-api.violet.io/v1/login \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "Content-Type: application/json" \
-d '{
"username": "[email protected]",
"password": "your-password"
}'
Expected Response
{
"id": 10084,
"first_name": "First",
"last_name": "Name",
"email": "[email protected]",
"type": "DEVELOPER",
"verified": true,
"date_created": "2022-04-11T21:03:04+0000",
"date_last_modified": "2024-10-23T21:52:56+0000",
"roles": [
{
"name": "ROLE_DEVELOPER",
"permissions": [
{
"name": "MANAGE_APPS"
},
{
"name": "MANAGE_USER"
}
]
}
],
"tos_accepted": false,
"token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ1c2VyQGV4YW1wbGUuY29tIiwic2NvcGVzIjpbIlJPTEVfREVWRUxPUEVSIl0sInVzZXJfaWQiOjEwMzk3LCJ1c2VyX3R5cGUiOiJERVZFTE9QRVIiLCJtZXJjaGFudF9pZHMiOltdLCJkZXZlbG9wZXJfaWQiOjEwMjkyLCJhcHBfaWQiOiIxMDM4MiIsImlzcyI6Imh0dHBzOi8vdmlvbGV0LmlvIiwiaWF0IjoxNjUyMzc3ODc0LCJleHAiOjE2NTI0NjQyNzR9.BW1HDpe1Gm2wA-esP8NWEtn9thEsfeKsIGEicAoMgDPEOyO6VdNP71ajqnPrMqITGadHApH-b6LewiBFAcobw",
"refresh_token": "rt_1234567890abcdef"
}
Last updated
Was this helpful?