DOCUMENTATION.md in notifications-ruby-client-4.0.0 vs DOCUMENTATION.md in notifications-ruby-client-5.1.0
- old
+ new
@@ -1,11 +1,9 @@
# Ruby client documentation
This documentation is for developers interested in using the GOV.UK Notify Ruby client to send emails, text messages or letters.
-We recommend that you use this client library rather than use the [GOV.UK Notify API](https://github.com/alphagov/notifications-api) directly, as there is no documentation for using the API in this way.
-
# Set up the client
## Install the client
Run the following in the command line:
@@ -23,11 +21,11 @@
```ruby
require 'notifications/client'
client = Notifications::Client.new(api_key)
```
-To get an API key, [sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/) and go to the __API integration__ page. You can find more information in the [API keys](/ruby.html#api-keys) section of this documentation.
+To get an API key, [sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/) and go to the __API integration__ page. You can find more information in the [API keys](#api-keys) section of this documentation.
# Send a message
You can use GOV.UK Notify to send text messages, emails or letters.
@@ -65,11 +63,11 @@
If a template has placeholder fields for personalised information such as name or reference number, you must provide their values in a hash. For example:
```ruby
personalisation: {
name: "John Smith",
- ID: "300241",
+ ID: "300241",
}
```
You can leave out this argument if a template does not have any placeholder fields for personalised information.
@@ -106,11 +104,11 @@
You can leave out this argument if your service only has one text message sender, or if you want to use the default sender.
### Response
-If the request to the client is successful, the client returns a `Notifications::Client:ResponseNotification` object. In the example shown in the [Method section](/ruby.html#method), the object is named `smsresponse`.
+If the request to the client is successful, the client returns a `Notifications::Client:ResponseNotification` object. In the example shown in the [Method section](#method), the object is named `smsresponse`.
You can then call different methods on this object:
|Method|Information|Type|
|:---|:---|:---|
@@ -118,26 +116,26 @@
|`smsresponse.reference`|`reference` argument|String|
|`smsresponse.content`|- `body`: Message body sent to the recipient<br>- `from_number`: SMS sender number of your service|Hash|
|`smsresponse.template`|Contains the `id`, `version` and `uri` of the template|Hash|
|`smsresponse.uri`|Notification URL|String|
-If you are using the [test API key](/ruby.html#test), all your messages come back with a `delivered` status.
+If you are using the [test API key](#test), all your messages come back with a `delivered` status.
All messages sent using the [team and whitelist](#team-and-whitelist) or [live](#live) keys appear on your GOV.UK Notify dashboard.
### Error codes
If the request is not successful, the client returns a `Notifications::Client::RequestError` and an error code.
|error.code|error.message|class|How to fix|
|:---|:---|:---|:---|
-|`400`|`BadRequestError: Can't send to this recipient using a team-only API key`|`BadRequestError`|Use the correct type of [API key](/ruby.html#api-keys)|
+|`400`|`BadRequestError: Can't send to this recipient using a team-only API key`|`BadRequestError`|Use the correct type of [API key](#api-keys)|
|`400`|`BadRequestError: Can't send to this recipient when service is in trial mode - see https://www.notifications.service.gov.uk/trial-mode`|`BadRequestError`|Your service cannot send this notification in [trial mode](https://www.notifications.service.gov.uk/features/using-notify#trial-mode)|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
-|`429`|`RateLimitError: Exceeded rate limit for key type TEAM/TEST/LIVE of 3000 requests per 60 seconds`|`RateLimitError`|Refer to [API rate limits](/ruby.html#api-rate-limits) for more information|
-|`429`|`TooManyRequestsError: Exceeded send limits (LIMIT NUMBER) for today`|`ClientError`|Refer to [service limits](/ruby.html#service-limits) for the limit number|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
+|`429`|`RateLimitError: Exceeded rate limit for key type TEAM/TEST/LIVE of 3000 requests per 60 seconds`|`RateLimitError`|Refer to [API rate limits](#api-rate-limits) for more information|
+|`429`|`TooManyRequestsError: Exceeded send limits (LIMIT NUMBER) for today`|`ClientError`|Refer to [service limits](#service-limits) for the limit number|
|`500`|`Exception: Internal server error`|`ServerError`|Notify was unable to process the request, resend your notification|
## Send an email
### Method
@@ -172,11 +170,11 @@
If a template has placeholder fields for personalised information such as name or reference number, you must provide their values in a hash. For example:
```ruby
personalisation: {
name: "John Smith",
- year: "2016"
+ year: "2016"
}
```
You can leave out this argument if a template does not have any placeholder fields for personalised information.
@@ -207,29 +205,31 @@
email_reply_to_id: '8e222534-7f05-4972-86e3-17c5d9f894e2'
```
You can leave out this argument if your service only has one email reply-to address, or you want to use the default email address.
-## Send a document by email
+## Send a file by email
Send files without the need for email attachments.
-This is an invitation-only feature. [Contact the GOV.UK Notify team](https://www.notifications.service.gov.uk/support) to enable this function for your service.
+This is an invitation-only feature. [Contact the GOV.UK Notify team](https://www.notifications.service.gov.uk/support/ask-question-give-feedback) to enable this function for your service.
-To send a document by email, add a placeholder field to the template then upload a file. The placeholder field will contain a secure link to download the document.
+To send a file by email, add a placeholder field to the template then upload a file. The placeholder field will contain a secure link to download the file.
+The links are unique and unguessable. GOV.UK Notify cannot access or decrypt your file.
+
### Add a placeholder field to the template
1. Sign in to [GOV.UK Notify](https://www.notifications.service.gov.uk/).
1. Go to the __Templates__ page and select the relevant email template.
1. Add a placeholder field to the email template using double brackets. For example:
-"Download your document at: ((link_to_document))"
+"Download your file at: ((link_to_document))"
-### Upload your document
+### Upload your file
-The document you upload must be a PDF file smaller than 2MB.
+The file you upload must be a PDF file smaller than 2MB.
1. Pass the file object as an argument to the `Notifications.prepare_upload` helper method.
1. Pass the result into the personalisation argument.
For example:
@@ -245,11 +245,11 @@
end
```
### Response
-If the request to the client is successful, the client returns a `Notifications::Client:ResponseNotification` object. In the example shown in the [Method section](/ruby.html#send-an-email-method), the object is named `emailresponse`.
+If the request to the client is successful, the client returns a `Notifications::Client:ResponseNotification` object. In the example shown in the [Method section](#send-an-email-method), the object is named `emailresponse`.
You can then call different methods on this object to return the requested information.
|Method|Information|Type|
|:---|:---|:---|
@@ -263,19 +263,19 @@
If the request is not successful, the client returns a `Notifications::Client::RequestError` and an error code.
|error.code|error.message|class|How to fix|
|:--- |:---|:---|:---|
-|`400`|`BadRequestError: Can't send to this recipient using a team-only API key`|`BadRequestError`|Use the correct type of [API key](/ruby.html#api-keys)|
+|`400`|`BadRequestError: Can't send to this recipient using a team-only API key`|`BadRequestError`|Use the correct type of [API key](#api-keys)|
|`400`|`BadRequestError: Can't send to this recipient when service is in trial mode - see https://www.notifications.service.gov.uk/trial-mode`|`BadRequestError`|Your service cannot send this notification in [trial mode](https://www.notifications.service.gov.uk/features/using-notify#trial-mode)|
|`400`|`BadRequestError: Unsupported document type '{}'. Supported types are: {}`|`BadRequestError`|The document you upload must be a PDF file|
|`400`|`BadRequestError: Document didn't pass the virus scan`|`BadRequestError`|The document you upload must be virus free|
|`400`|`BadRequestError: Service is not allowed to send documents`|`BadRequestError`|Contact the GOV.UK Notify team|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
-|`429`|`RateLimitError: Exceeded rate limit for key type TEAM/TEST/LIVE of 3000 requests per 60 seconds`|`RateLimitError`|Refer to [API rate limits](/ruby.html#api-rate-limits) for more information|
-|`429`|`TooManyRequestsError: Exceeded send limits (LIMIT NUMBER) for today`|`RateLimitError`|Refer to [service limits](/ruby.html#service-limits) for the limit number|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
+|`429`|`RateLimitError: Exceeded rate limit for key type TEAM/TEST/LIVE of 3000 requests per 60 seconds`|`RateLimitError`|Refer to [API rate limits](#api-rate-limits) for more information|
+|`429`|`TooManyRequestsError: Exceeded send limits (LIMIT NUMBER) for today`|`RateLimitError`|Refer to [service limits](#service-limits) for the limit number|
|`500`|`Exception: Internal server error`|`ServerError`|Notify was unable to process the request, resend your notification|
|-|`ArgumentError: Document is larger than 2MB")`|-|Document size was too large, upload a smaller document|
## Send a letter
@@ -289,11 +289,11 @@
```ruby
letterresponse = client.send_letter(
template_id: "f33517ff-2a88-4f6e-b855-c550268ce08a",
personalisation: {
- address_line_1: 'The Occupier',
+ address_line_1: 'The Occupier',
address_line_2: '123 High Street',
postcode: 'SW14 6BH',
},
)
```
@@ -350,11 +350,11 @@
reference: 'your_reference_string'
```
### Response
-If the request to the client is successful, the client returns a `Notifications::Client:ResponseNotification` object. In the example shown in the [Method section](/ruby.html#send-a-letter-method), the object is named `letterresponse`.
+If the request to the client is successful, the client returns a `Notifications::Client:ResponseNotification` object. In the example shown in the [Method section](#send-a-letter-method), the object is named `letterresponse`.
You can then call different methods on this object to return the requested information.
|Method|Information|Type|
|:---|:---|:---|
@@ -369,17 +369,17 @@
If the request is not successful, the client returns a `Notifications::Client::RequestError` and an error code.
|error.code|error.message|class|How to fix|
|:--- |:---|:---|:---|
-|`400`|`BadRequestError: Cannot send letters with a team api key`|`BadRequestError`|Use the correct type of [API key](/ruby.html#api-keys)|
+|`400`|`BadRequestError: Cannot send letters with a team api key`|`BadRequestError`|Use the correct type of [API key](#api-keys)|
|`400`|`BadRequestError: Cannot send letters when service is in trial mode - see https://www.notifications.service.gov.uk/trial-mode`|`BadRequestError`|Your service cannot send this notification in [trial mode](https://www.notifications.service.gov.uk/features/using-notify#trial-mode)|
-|`400`|`ValidationError: personalisation address_line_1 is a required property`|`BadRequestError`|Ensure that your template has a field for the first line of the address, refer to [personalisation](/ruby.html#personalisation-required) for more information|
+|`400`|`ValidationError: personalisation address_line_1 is a required property`|`BadRequestError`|Ensure that your template has a field for the first line of the address, refer to [personalisation](#personalisation-required) for more information|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
-|`429`|`RateLimitError: Exceeded rate limit for key type TEAM/TEST/LIVE of 3000 requests per 60 seconds`|`RateLimitError`|Refer to [API rate limits](/ruby.html#api-rate-limits) for more information|
-|`429`|`TooManyRequestsError: Exceeded send limits (LIMIT NUMBER) for today`|`RateLimitError`|Refer to [service limits](/ruby.html#service-limits) for the limit number|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
+|`429`|`RateLimitError: Exceeded rate limit for key type TEAM/TEST/LIVE of 3000 requests per 60 seconds`|`RateLimitError`|Refer to [API rate limits](#api-rate-limits) for more information|
+|`429`|`TooManyRequestsError: Exceeded send limits (LIMIT NUMBER) for today`|`RateLimitError`|Refer to [service limits](#service-limits) for the limit number|
|`500`|`Exception: Internal server error`|`ServerError`|Notify was unable to process the request, resend your notification|
## Send a precompiled letter
### Method
@@ -392,11 +392,11 @@
#### reference (required)
A unique identifier you create. This reference identifies a single unique notification or a batch of notifications. It must not contain any personal information such as name or postal address.
#### pdf_file (required)
-The precompiled letter must be a PDF file which meets [the GOV.UK Notify PDF letter specification](https://docs.notifications.service.gov.uk/documentation/images/notify-pdf-letter-spec-v2.3.pdf).
+The precompiled letter must be a PDF file which meets [the GOV.UK Notify PDF letter specification](https://docs.notifications.service.gov.uk/documentation/images/notify-pdf-letter-spec-v2.4.pdf).
```ruby
File.open("path/to/pdf_file", "rb") do |pdf_file|
client.send_precompiled_letter("your reference", pdf_file)
end
@@ -407,11 +407,11 @@
You can choose first or second class postage for your precompiled letter. Set the value to `first` for first class, or `second` for second class. If you do not pass in this argument, the postage will default to second class.
### Response
-If the request to the client is successful, the client returns a `Notifications::Client:ResponsePrecompiledLetter` object. In the example shown in the [Method section](/ruby.html#send-a-pre-compiled-letter-method), the object is named `precompiled_letter`.
+If the request to the client is successful, the client returns a `Notifications::Client:ResponsePrecompiledLetter` object. In the example shown in the [Method section](#send-a-pre-compiled-letter-method), the object is named `precompiled_letter`.
You can then call different methods on this object to return the requested information.
|Method|Information|Type|
|:---|:---|:---|
@@ -484,22 +484,17 @@
### Arguments
#### id (required)
-The ID of the notification. You can find the notification ID in the response to the [original notification method call](/ruby.html#response).
+The ID of the notification. You can find the notification ID in the response to the [original notification method call](#response).
-You can also find it in your [GOV.UK Notify Dashboard](https://www.notifications.service.gov.uk).
+You can also find it by signing in to [GOV.UK Notify](https://www.notifications.service.gov.uk) and going to the __API integration__ page.
-1. Sign into GOV.UK Notify and select __Dashboard__.
-1. Select either __emails sent__, __text messages sent__, or __letters sent__.
-1. Select the relevant notification.
-1. Copy the notification ID from the end of the page URL, for example `https://www.notifications.service.gov.uk/services/af90d4cb-ae88-4a7c-a197-5c30c7db423b/notification/ID`.
-
### Response
-If the request to the client is successful, the client returns a `Notifications::Client::Notification` object. In the example shown in the [Method section](/ruby.html#get-the-status-of-one-message-method), the object is named `response`.
+If the request to the client is successful, the client returns a `Notifications::Client::Notification` object. In the example shown in the [Method section](#get-the-status-of-one-message-method), the object is named `response`.
You can then call different methods on this object to return the requested information.
|Method|Information|Type|
|:---|:---|:---|
@@ -531,11 +526,11 @@
|error.code|error.message|class|How to fix|
|:---|:---|:---|:---|
|`400`|`ValidationError: id is not a valid UUID`|`BadRequestError`|Check the notification ID|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
|`404`|`NoResultFound: No result found`|`NotFoundError`|Check the notification ID. This error occurs if the notification is more than 7 days old.|
## Get the status of multiple messages
This API call returns one page of up to 250 messages and statuses. You can get either the most recent messages, or get older messages by specifying a particular notification ID in the `older_than` argument.
@@ -609,11 +604,11 @@
The client only returns notifications that are 7 days old or newer. If the notification specified in this argument is older than 7 days, the client returns an empty response.
### Response
-If the request to the client is successful, the client returns a `Notifications::Client::NotificationsCollection` object. In the example shown in the [Method section](/ruby.html#get-the-status-of-multiple-messages-method), the object is named `response`.
+If the request to the client is successful, the client returns a `Notifications::Client::NotificationsCollection` object. In the example shown in the [Method section](#get-the-status-of-multiple-messages-method), the object is named `response`.
You must then call either the `.links` method or the `.collection` method on this object.
|Method|Information|
|:---|:---|
@@ -654,12 +649,51 @@
|error.code|error.message|class|How to fix|
|:---|:---|:---|:---|
|`400`|`ValidationError: bad status is not one of [created, sending, sent, delivered, pending, failed, technical-failure, temporary-failure, permanent-failure, accepted, received]`|`BadRequestError`|Contact the GOV.UK Notify team|
|`400`|`ValidationError: Template type is not one of [sms, email, letter]`|`BadRequestError`|Contact the GOV.UK Notify team|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
+## Get a PDF for a letter notification
+
+### Method
+
+This returns the pdf contents of a letter notification.
+
+```ruby
+pdf_file = client.get_pdf_for_letter(
+ 'f33517ff-2a88-4f6e-b855-c550268ce08a' # notification id (required)
+)
+```
+
+### Arguments
+
+#### id (required)
+
+The ID of the notification. You can find the notification ID in the response to the [original notification method call](#get-the-status-of-one-message-response).
+
+You can also find it by signing in to [GOV.UK Notify](https://www.notifications.service.gov.uk) and going to the __API integration__ page.
+
+### Response
+
+If the request to the client is successful, the client will return a `string` containing the raw PDF data.
+
+### Error codes
+
+If the request is not successful, the client throws a `Notifications::Client::RequestError` and an error code.
+|error.code|error.message|class|How to fix|
+|:---|:---|:---|:---|
+|`400`|`ValidationError: id is not a valid UUID`|`BadRequestError`|Check the notification ID|
+|`400`|`PDFNotReadyError: PDF not available yet, try again later`|`BadRequestError`|Wait for the notification to finish processing. This usually takes a few seconds|
+|`400`|`BadRequestError: Document did not pass the virus scan`|`BadRequestError`|You cannot retrieve the contents of a letter notification that contains a virus|
+|`400`|`BadRequestError: PDF not available for letters in technical-failure`|`BadRequestError`|You cannot retrieve the contents of a letter notification in technical-failure|
+|`400`|`ValidationError: Notification is not a letter`|`BadRequestError`|Check that you are looking up the correct notification|
+|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`BadRequestError`|Check your system clock|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`BadRequestError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
+|`404`|`NoResultFound: No result found`|`BadRequestError`|Check the notification ID|
+
+
# Get a template
## Get a template by ID
### Method
@@ -680,11 +714,11 @@
'f33517ff-2a88-4f6e-b855-c550268ce08a'
```
### Response
-If the request to the client is successful, the client returns a `Notifications::Client::Template` object. In the example shown in the [Method section](/ruby.html#get-a-template-by-id-method), the object is named `response`.
+If the request to the client is successful, the client returns a `Notifications::Client::Template` object. In the example shown in the [Method section](#get-a-template-by-id-method), the object is named `response`.
You can then call different methods on this object to return the requested information.
|Method|Information|Type|
|:---|:---|:---|
@@ -704,12 +738,12 @@
|error.code|error.message|class|How to fix|
|:---|:---|:---|:---|
|`400`|`ValidationError: id is not a valid UUID`|`BadRequestError`|Check the notification ID|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
-|`404`|`NoResultFound: No Result Found`|`NotFoundError`|Check your [template ID](/ruby.html#get-a-template-by-id-arguments-id-required)|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
+|`404`|`NoResultFound: No Result Found`|`NotFoundError`|Check your [template ID](#get-a-template-by-id-arguments-id-required)|
## Get a template by ID and version
### Method
@@ -731,11 +765,11 @@
The version number of the template.
### Response
-If the request to the client is successful, the client returns a `Notifications::Client::Template` object. In the example shown in the [Method section](/ruby.html#get-a-template-by-id-and-version-method), the object is named `response`.
+If the request to the client is successful, the client returns a `Notifications::Client::Template` object. In the example shown in the [Method section](#get-a-template-by-id-and-version-method), the object is named `response`.
You can then call different methods on this object to return the requested information.
|Method|Information|Type|
|:---|:---|:---|
@@ -755,12 +789,12 @@
|error.code|error.message|class|How to fix|
|:---|:---|:---|:---|
|`400`|`ValidationError: id is not a valid UUID`|`BadRequestError`|Check the notification ID|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
-|`404`|`NoResultFound: No Result Found`|`NotFoundError`|Check your [template ID](/ruby.html#get-a-template-by-id-and-version-arguments-id-required) and [version](/ruby.html#version-required)|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
+|`404`|`NoResultFound: No Result Found`|`NotFoundError`|Check your [template ID](#get-a-template-by-id-and-version-arguments-id-required) and [version](#version-required)|
## Get all templates
### Method
@@ -783,11 +817,11 @@
- `sms`
- `letter`
### Response
-If the request to the client is successful, the client returns a `Notifications::Client::TemplateCollection` object. In the example shown in the [Method section](/ruby.html#get-all-templates-method), the object is named `response`.
+If the request to the client is successful, the client returns a `Notifications::Client::TemplateCollection` object. In the example shown in the [Method section](#get-all-templates-method), the object is named `response`.
You must then call the `.collection` method on this object to return an array of the required templates.
Once the client has returned a template array, you must then call the following methods on the templates in this array to return information on those templates.
@@ -840,19 +874,19 @@
If a template has placeholder fields for personalised information such as name or application date, you must provide their values in a hash. For example:
```ruby
personalisation: {
name: "John Smith",
- ID: "300241",
+ ID: "300241",
}
```
You can leave out this argument if a template does not have any placeholder fields for personalised information.
### Response
-If the request to the client is successful, the client returns a `Notifications::Client::TemplatePreview` object. In the example shown in the [Method section](/ruby.html#generate-a-preview-template-method), the object is named `response`.
+If the request to the client is successful, the client returns a `Notifications::Client::TemplatePreview` object. In the example shown in the [Method section](#generate-a-preview-template-method), the object is named `response`.
You can then call different methods on this object to return the requested information.
|Method|Information|Type|
|:---|:---|:---|
@@ -868,25 +902,25 @@
If the request is not successful, the client returns a `Notifications::Client::RequestError` and an error code:
|error.code|error.message|class|How to fix|
|:---|:---|:---|:---|
|`400`|`BadRequestError: Missing personalisation: [PERSONALISATION FIELD]`|`BadRequestError`|Check that the personalisation arguments in the method match the placeholder fields in the template|
-|`400`|`NoResultFound: No result found`|`BadRequestError`|Check the [template ID](/ruby.html#generate-a-preview-template-arguments-id-required)|
+|`400`|`NoResultFound: No result found`|`BadRequestError`|Check the [template ID](#generate-a-preview-template-arguments-id-required)|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|
# Get received text messages
This API call returns one page of up to 250 received text messages. You can get either the most recent messages, or get older messages by specifying a particular notification ID in the `older_than` argument.
You can only get the status of messages that are 7 days old or newer.
-You can also set up [callbacks](/ruby.html#callbacks) for received text messages.
+You can also set up [callbacks](#callbacks) for received text messages.
## Enable received text messages
-Contact the GOV.UK Notify team on the [support page](https://www.notifications.service.gov.uk/support) or through the [Slack channel](https://ukgovernmentdigital.slack.com/messages/govuk-notify) to enable receiving text messages for your service.
+Contact the GOV.UK Notify team on the [support page](https://www.notifications.service.gov.uk/support) or through the [Slack channel](https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC) to enable receiving text messages for your service.
## Get a page of received text messages
### Method
@@ -915,11 +949,11 @@
The client only returns notifications that are 7 days old or newer. If the notification specified in this argument is older than 7 days, the client returns an empty `collection` response.
### Response
-If the request to the client is successful, the client returns a `Notifications::Client::ReceivedTextCollection` object. In the example shown in the [Method section](/ruby.html#get-received-text-messages-method), the object is named `response`.
+If the request to the client is successful, the client returns a `Notifications::Client::ReceivedTextCollection` object. In the example shown in the [Method section](#get-received-text-messages-method), the object is named `response`.
You must then call either the `.links` method or the `.collection` method on this object.
|Method|Information|
|:---|:---|
@@ -944,6 +978,6 @@
If the request is not successful, the client returns a `Notifications::Client::RequestError` and an error code.
|error.code|error.message|class|How to fix|
|:---|:---|:---|:---|
|`403`|`AuthError: Error: Your system clock must be accurate to within 30 seconds`|`AuthError`|Check your system clock|
-|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](/ruby.html#api-keys) for more information|
+|`403`|`AuthError: Invalid token: signature, api token not found`|`AuthError`|Use the correct API key. Refer to [API keys](#api-keys) for more information|