Authorizing Requests
Authorization API
URL
HTTP Verb
Functionality
Authenticate with username and password to receive a short-lived JWT access token (15-minute expiry) and a refresh token.
Body
usernamestringRequiredExample:
user@example.compasswordstring · passwordRequiredExample:
s3cretResponses
200
Authentication successful.
application/json
accessTokenstringOptionalExample:
Short-lived JWT access token (15-minute expiry).
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...refreshTokenstringOptionalExample:
Long-lived token used to obtain a new access token.
dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...401
Invalid credentials.
application/json
post/authorize
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..."
}Last updated
