To request access to the API please e-mail us.
For each application you are accessing the API from, we will provide you with a client_id
and client_secret
.
Read more about securing your API keys here.
Authorisation
You can execute a client credentials exchange to get an access token
for Liveforce API. Here is a curl example, replace the values for client_id
and client_secret
with the keys we have provided. This is a post request so implement it in whichever way is appropriate for your application.
Audience: https://admin.liveforce.co/
Grant type: client_credentials
curl --request POST \
--url https://liveforce.eu.auth0.com/oauth/token \
--header 'content-type: application/json' \
--data '{"client_id":"SJB58bQRGYv2yeTYxk9fWT1BGZMT4UiU","client_secret":"kkr2565upfSVl6f7Gq9aRt8vOQlf4beUgc-fihhLiJRbKLxrVAH1OUt6CN_xLTJMf","audience":"https://admin.liveforce.co/","grant_type":"client_credentials"}'
Response
{
"access_token": "eyJhbGckkOiJSUzI1NiIsInRfcCI6IkpXVCIsImtpZCI6IkxvZjZpRm9EbWlGWHctSzA5Nkd4MyJ9.eyJodHRwczovL3N0YWdpbmcubGl2ZWZvcmNlLmNvL3Byb3h5L2NvbXBhbnktaWQiOiI0OTIiLCJpc3MiOiJodHRwczovL2xpdmVmb3JjZS5ldS5hdXRoMC5jb20vIiwic3ViIjoiU0pCNThiUVJHWXYyeWVUWXhHTEhXVDFCR1pNVDRVaVVAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vc3RhZ2luZy5saXZlZm9yY2UuY28vcHJveHkvIiwiaWF0IjoxNjM1NzIyODMxLCJleHAiOjE2MzU4MDkyMzEsImF6cCI6IlNKQjU4YlFSR1l2MnllVFl4R0xIV1QxQkdaTVQ0VWlVIiwic2NvcGUiOiJyZWFkOnBheW1lbnRfcmVwb3J0cyByZWFkOmNvbXBhbnlfY3Jld19kYXRhIHdyaXRlOmNvbXBhbnlfY3Jld19kYXRhIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.NfgsQYdlZyaoPl5g9spoU1SodCVX2SacmmIFzXAnvh3x7WKTFYiI7wWNAjHFzVtjelpAFYp8KDyMDvVptzxae_AtG8F05fp8ro-DfNlTE4BfP-bXOfnIs8IPk7AmsNWW7Mf3A9YkzbIGqiqYse7Ks5MjkgMpceuRT8m54wlFmfyb3Evq3oSNTVgy0NwSJl4lbB6cPSVVsD33-ilnzwRAd0bYic7MNZHJZilL-YdKBeB8QcNLtLV-ROCgQviFQIRD6vvvdbWk9GHrCXEBsaVc4ma_C5o0najofNXPsvawDaFiwuoHS5Acouq8BSPGozFd-FsYDa5toxKcrNEpxkhKxQ",
"token_type": "Bearer"
}
Sending the token to the API
You can use this bearer token
with an Authorization Header
in your request to obtain authorised access to your API.
Base for the API is: https://api.liveforce.co
curl --request GET \
--url https://api.liveforce.co/[api-endpoint] \
--header 'authorization: Bearer eydhbGciOiJSUzI1NiIsInR5cCI6IapXVCIsImtpZCI6IkxvZjZpRm9EbWlGWHctSzA5Nkd4MyJ9.eyJpc3MiOiJodHRwczovL2xpdmVmb3JjZS5ldS5hdXRoMC5jb20vIiwic3ViIjoiNWtHMm5zYjVJVXpsdkRhb0VMbW1yY1FLa24yUkRmQ3NAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vc3RhZ2luZy5saXZlZm9yY2UuY28vcHJveHkvIiwiaWF0IjoxNjM1NzI3NDE0LCJleHAiOjE2MzU4MTM4MTQsImF6cCI6IjVrRzJuc2I1SVV6bHZEYW9FTG1tcmNRS2tuMlJEZkNzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.CCckVGIEC4BtBxL_WOuCCkNnqbPveNGyK9sG_Yepwz2QxtQkXZnJZN9eowLl5XnQ5rf6gQxu0-VP_a1e8mbNYGEW54N3-F6abVUBzWSIez4-_Nku4dBxgcgtl6KnD-cJs4KrQzWOKp2vx3VYe8BjO5mnhjeFcbES_a47dXXyrLoKjwkgmy0OwGvHBzKSxE-FMwQOQ-AFUoGPZwBJ16edGJ3bbDMBZNv15JxovOPtdwvNTJnWckkX8335d3wxCTIjqXY60LUIi_LW3QUi7ilQr4Qdb45r5EVORo5vlanF9kLHz0H_e3au0FDigWKN5CgdS-Uki9PlPyTs1bafoX36Wg'