@@ -32,14 +32,14 @@ To find out more about GOV.UK Notify, see the [Government as a Platform](https:/
<h2 id="beforestart">Before you start</h2>
1. Register for a [GOV.UK Notify](https://www.notifications.service.gov.uk/) account.
1. Register for a [GOV.UK Notify](https://www.notifications.service.gov.uk/) account.
You'll need an email address from a local or central government organisation and your mobile phone for 2-factor authentication.
2. Add a template so you can send text and email notifications.
2. Add a template so you can send text and email notifications.
**Note:** A template is required even if you send notifications with the GOV.UK Notify API.
You can personalise the template using double brackets for placeholders. For example:
> Dear ((name)),
@@ -49,8 +49,8 @@ To find out more about GOV.UK Notify, see the [Government as a Platform](https:/
3. Create an API key. This will be used to connect to the GOV.UK Notify API.
Each service can have multiple API keys. This allows you to integrate several systems, each with its own key. You can also have separate keys for your development and test environments.
**Important:** API keys are secret, so save them somewhere safe. Don't commit API keys to public source code repositories.
**Important:** API keys are secret, so save them somewhere safe. Don't commit API keys to public source code repositories.
<h2 id="integrate_Notify">Integrate the GOV.UK Notify API into your service</h2>
@@ -58,13 +58,13 @@ There are 2 ways to integrate the API into your service:
* use one of the client libraries provided by GOV.UK Notify (see the Usage section in the Readme files):
* develop your own integration to produce requests in the correct format
<h3 id="AuthRequests">Authenticate requests</h3>
GOV.UK Notify uses [JSON Web Tokens (JWT)](https://jwt.io/introduction/) for authentication and identification. The GOV.UK Notify client libraries encode and decode JSON Web Tokens when making requests to the GOV.UK Notify API. If you don’t use one of these libraries, you must manually create tokens yourself.
GOV.UK Notify uses [JSON Web Tokens (JWT)](https://jwt.io/introduction/) for authentication and identification. The GOV.UK Notify client libraries encode and decode JSON Web Tokens when making requests to the GOV.UK Notify API. If you don’t use one of these libraries, you must manually create tokens yourself.
For examples of how to encode and decode JSON Web Tokens, see [authentication.py](https://github.com/alphagov/notifications-python-client/blob/master/notifications_python_client/authentication.py) in the GOV.UK Notify Python client library, or the appropriate [PHP] (https://github.com/alphagov/notifications-php-client) or [Java] (https://github.com/alphagov/notifications-java-client) client library.
@@ -95,7 +95,7 @@ GOV.UK Notify application-specific claims (these form the JSON Web Token payload
}
```
The header and payload are Base64Url encoded.
The header and payload are Base64Url encoded.
The verify signature is created using the HMAC SHA256 hashing algorithm.
@@ -103,7 +103,7 @@ The verify signature is created using the HMAC SHA256 hashing algorithm.
GOV.UK Notify supports the following client libraries:
*`to` is a required string that indicates the recipient's phone number or email address
*`template` is a required string that indicates the Template ID to use
**Note:** To access the Template ID from the [GOV.UK Notify](https://www.notifications.service.gov.uk/) web application, go to **Text message templates** or **Email templates** and click on **API info**.
*`personalisation` is an optional array that specifies the placeholders and values in your templates
@@ -169,11 +169,11 @@ where:
The response (status code 201) will be:
```
{
'data':{
'notification': {
'id':1
}
}
'data':{
'notification': {
'id':1
}
}
}
```
@@ -190,31 +190,34 @@ The response (status code 200) will be:
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.