HomeGuidesChangelogDiscussions
Log In
Guides

Authentication

Our Business (Integrator) profiles are linked with the user who registered the integrator profile. As such, to generate a token to access our services, this can be done with our /auth endpoint. The registering user needs to provide their email and password upon which a response containing the token would be provided.

This endpoint can also be used to regenerate a new token for accessing our services.

curl --location --request POST 'https://api-sandbox.spendjuice.com/auth' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "issuance@cardcompany.com",
    "password": "P@ssw0rd!"
}'
{
    "data": {
        "token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJqdWljZSIsImV4cCI6MTY2MzYwOTUzMSwiaWF0IjoxNjQ4MDU3NTMxLCJpc3MiOiJqdWljZSIsImp0aSI6IjlkNWZmNzViLTM5MDQtNDBlOC04Yjg1LThjNGViZTU5ZjE3MCIsIm5iZiI6MTY0ODA1NzUzMCwic3ViIjoiYnVzaW5lc3M6ZmNjOWRhY2QtYTk5Yi00OWM0LWE0YjAtMzUwNTYzNTdjMzUwIiwidHlwIjoiYWNjZXNzIn0.FGsSxX104Kzdh1I07k3XVvLMf5l25GPYXzLjdV6JNhWuY5wpemjnw12hO2zJvxLHgV8tdePRvZ82QxKURFG1BQ"
    }
}