# 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

| URL        | HTTP Verb | Functionality                                                            |
| ---------- | --------- | ------------------------------------------------------------------------ |
| /authorize | POST      | Login with posting credentials to get access and refresh JSON Web Tokens |

{% openapi src="/files/wYQaKpPZEdPb68ZWOF6w" path="/authorize" method="post" %}
[openapi.yaml](https://3664004773-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwQ2AvqpbIy1hD3QFTQG%2Fuploads%2Fgit-blob-9d646f1681dee35f7dc1c0638c3b2af1bcd498f5%2Fopenapi.yaml?alt=media)
{% endopenapi %}

{% hint style="warning" %}
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:

```
{
    "Authorization": "Bearer <insert-json-web-token>"
}
```

For more information about JWT please visit [jwt.io](https://jwt.io/)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-v2-docs.disasteraware.com/authentication/authorizing-requests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
