Files
notifications-api/docs/api-usage.md

29 lines
840 B
Markdown
Raw Normal View History

2022-10-26 15:45:45 +00:00
# API Usage
## Connecting to the API
To make life easier, the [UK API client libraries](https://www.notifications.service.gov.uk/documentation) are compatible with Notify.
For a usage example, see [our Python demo](https://github.com/GSA/notify-python-demo).
An API key can be created at https://notifications-admin.app.cloud.gov/services/YOUR_SERVICE_ID/api/keys. However, in order to successfully send messages, you will need to receive a secret header token from the Notify team.
2022-11-17 10:57:34 -05:00
## Using OpenAPI documentation
### Retrieving a bearer token for use
On a mac, run
```
flask command create-admin-jwt | tail -n 1 | pbcopy
```
to copy a token usable by the admin UI to your pasteboard. This token will expire in 30 seconds
2022-11-17 17:04:51 -05:00
### Disable token expiration checking in development
```
env ALLOW_EXPIRED_API_TOKEN=1 make run-flask
```