This endpoint requires authentication. Include your Bearer token in the Authorization header.
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
curl --request POST \
--url https://api.royalti.io/auth/login \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "someone@example.com",
"password": "Testpassword"
}'{
"message": "Successful",
"workspaces": [
{
"workspaceId": "7bd60554-4f63-4c62-a5f6-c29c3f67cb2a",
"name": "Royalti Demo",
"status": "active",
"userType": [
[
"Artist"
]
],
"role": "user"
}
],
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjRlNDI3MjllLWYxNGQtNDhlNy1iNGNiLWMxODliNmQxNThlNiIsIm5hbWUiOiJyZWZyZXNoX3Rva2VuIiwiaWF0IjoxNzA3MzAxNTAxLCJleHAiOjE3MDczODc5MDF9.TPEuW4Fuzycid1sGEeXGZseIK187QE5ECF92WDhcpHE"
}/auth/login
curl --request POST \
--url https://api.royalti.io/auth/login \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "someone@example.com",
"password": "Testpassword"
}'{
"message": "Successful",
"workspaces": [
{
"workspaceId": "7bd60554-4f63-4c62-a5f6-c29c3f67cb2a",
"name": "Royalti Demo",
"status": "active",
"userType": [
[
"Artist"
]
],
"role": "user"
}
],
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjRlNDI3MjllLWYxNGQtNDhlNy1iNGNiLWMxODliNmQxNThlNiIsIm5hbWUiOiJyZWZyZXNoX3Rva2VuIiwiaWF0IjoxNzA3MzAxNTAxLCJleHAiOjE3MDczODc5MDF9.TPEuW4Fuzycid1sGEeXGZseIK187QE5ECF92WDhcpHE"
}const response = await fetch('https://api.royalti.io/auth/login', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"email": "sample-email",
"password": "sample-password",
"loginToken": "sample-loginToken"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"