Authorizing Requests
When sending requests to the API endpoints, the request includes a header that contains an authorization code. The authorization code is acquired by sending a request to DisasterAWARE Enterprise API Authorization endpoint.
Please note, authorization tokens are valid for 15 mins, at which time you will need to request a new authorization token. The tokens are standard JWT tokens, therefore you can decode the token to review the expiration (exp) value. You can paste your token into https://jwt.io to inspect the token details.
Authorization API
/authorize
POST
Login with posting credentials to get access and refresh JSON Web Tokens
Authenticate with username and password to receive a short-lived JWT access token (15-minute expiry) and a refresh token.
user@example.coms3cretAuthentication successful.
Short-lived JWT access token (15-minute expiry).
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Long-lived token used to obtain a new access token.
dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...Invalid credentials.
POST /authorize HTTP/1.1
Host: api-v2.disasteraware.com
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"username": "user@example.com",
"password": "s3cret"
}{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4..."
}Please use the provided credentials to complete this request. The response will include a JSON Web Token (JWT) that you will send with the Authorization request header in the following format:
For more information about JWT please visit jwt.io
Last updated
