Generating an Access Token
Refresh Tokens
Access tokens are generating using a User Authentication Token, this token is also referred to as a Refresh Token. Below is the endpoint for generating a refresh token. The refresh tokens returned in this call are valid for one year.
Authenticate/Generate Refresh Token Endpoint
POST https://user-service.active911.com/v1/authenticate
POST Body | Response |
---|---|
{
"email": user's email,
"password": user's password
} | {
"success": request succeeded,
"result": {
"id": UserUUID,
"token": RefreshToken
},
"message": message if error,
"code": http response code,
"token": always null for this operation
} |
Sample Request
CURL Request
curl -X POST https://user-service.active911.com/v1/authenticate -d "email=example@active911.com" -d "password=Password123"
Sample Response
{
"success":true,
"result":{
"id":"5362b042-be07-4fc4-87ec-0e10b8c7f40e",
"token":"eyJhbGciOiJSUzUxMiJ9.eyJleHAiOjE3MjkxMTg0ODkwODIsInN1YiI6IjUzNjJiMDQyLWJlMDctNGZjNC04N2VjLTBlMTBiOGM3ZjQwZSIsInN1IjowLCJpYXQiOjE2OTc1NjE1Mzd9.pyOOxNNtzBoTBwvFirF9i9Mq0WQFCbgCa4Q4zksXqHPH1vNEkAClc8aVDsZphHf1ART9MqjToeqVFa9UOwaqO8pY3OMY8-zWq0ZvXsVZeg5RWzyRFtAImYylu_j0dWO2oAjjapN2WfzHFE1bfuKwoCQQKFeugztnAfNag30lj1QhknEQQPNcb0rDZJOV9SAQka157yiXJ1ZVcjlj5PvaKuLPuE9LC8pR8Kab9R1iP6OcPH4DrYRq24Ffvep5GfY8imZyzPQaXhgjJkSCPb2AFnl-J29ZNnaDq45N4GyY5F2LCLj9zVTOPQDDMti70ldbaUiBhYuV6UlODLw8JLTBXA"
},
"message":"",
"code":"HTTP_API_SUCCESS",
"token":null
}
Access Token
Once you have a refresh token, that token can be used to generate an access token which may be used to perform operations in Active911’s public facing API endpoints. The endpoint to generate an acccess token does not take any POST body, but requires the refresh token to be set in the authorization header, named a911Auth. Access tokens expire after 15 minutes.
Generate Access Token Endpoint
POST https://user-service.active911.com/v1/user/access
Headers | Response |
---|---|
{
...
Authorization: a911Auth RefreshToken
...
} | {
"success": request succeeded,
"result": {
"id": UserUUID,
"token": AccessToken
},
"message": message if error,
"code": http response code,
"token": always null for this operation
} |
Sample Request
CURL Request
curl --location --request POST 'https://user-service.active911.com/v1/user/access' \
--header 'Authorization: a911Auth eyJhbGciOiJSUzUxMiJ9.eyJleHAiOjE3MjkxMTg0ODkwODIsInN1YiI6IjUzNjJiMDQyLWJlMDctNGZjNC04N2VjLTBlMTBiOGM3ZjQwZSIsInN1IjowLCJpYXQiOjE2OTc1NjE1Mzd9.pyOOxNNtzBoTBwvFirF9i9Mq0WQFCbgCa4Q4zksXqHPH1vNEkAClc8aVDsZphHf1ART9MqjToeqVFa9UOwaqO8pY3OMY8-zWq0ZvXsVZeg5RWzyRFtAImYylu_j0dWO2oAjjapN2WfzHFE1bfuKwoCQQKFeugztnAfNag30lj1QhknEQQPNcb0rDZJOV9SAQka157yiXJ1ZVcjlj5PvaKuLPuE9LC8pR8Kab9R1iP6OcPH4DrYRq24Ffvep5GfY8imZyzPQaXhgjJkSCPb2AFnl-J29ZNnaDq45N4GyY5F2LCLj9zVTOPQDDMti70ldbaUiBhYuV6UlODLw8JLTBXA'
Sample Response
{
"success": true,
"result": {
"id": "5362b042-be07-4fc4-87ec-0e10b8c7f40e",
"token": "eyJhbGciOiJSUzUxMiJ9.eyJleHAiOjE2OTc1NjM4NDUzNjQsInN1YiI6IjUzNjJiMDQyLWJlMDctNGZjNC04N2VjLTBlMTBiOGM3ZjQwZSIsInNjb3BlIjoiYWNjZXNzIiwiaWF0IjoxNjk3NTYyMDQ1fQ.QIdWdkH_e8P3YUugCVvmIPezK6TVbrHFoRslPvG7dCmC-_y7ywBXpZf3tMOaMohPvczQVfEasEeacKx3aar_nYf4Pi-lByQ6u5Zg4Ol_XtXf4_wg-oFAMq2ph-_jhm9PUgmwMfhEpu2D8myq-SqA3VXTRzF_sK2DpIAemWmLZqetLQCu4IWSnd4BBc3Nkky7TRLkaBWbmNHjPXDX8rICDGNg9DCIFh4RIIQRwLFcy3kxcU0F8p4whAKmFOXjWU9c39wwgHnkSbVq95RRW_Eg7qOIaq2PURSnqjhFvmwnQnHLAsfCtkla7kDa_i7tvvQKcd0lIugtaTYxtdYJJF8Cqw"
},
"message": "",
"code": "HTTP_API_SUCCESS",
"token": null
}
, multiple selections available,
Related content
Personal/Test OAuth Token Generation
Personal/Test OAuth Token Generation
Read with this
Accessing the API
Accessing the API
Read with this
Developer API Examples
Developer API Examples
Read with this
Application OAuth Token Generation
Application OAuth Token Generation
Read with this
ActiveAlert
ActiveAlert
Read with this