From d1449a26ad7f9557529e3d7774e9503c4b0e465f Mon Sep 17 00:00:00 2001
From: Rebecca Law
- Service teams should do all their testing within the GOV.UK Notify production environment, https://api.notifications.service.gov.uk.
-
- You don’t need different Notify accounts or access to other Notify environments. Instead, there are different types of API keys that let you do functional or performance integration testing.
+ There are different types of API keys that let you do functional or performance integration testing.
+ You don’t need different GOV.UK Notify accounts or access to other GOV.UK Notify environments.
- There are 3 types of API key available within GOV.UK Notify:
-
Once your service is live you are able to create Live keys. You can then use these keys to send messages to anyone.
@@ -35,26 +48,27 @@
Messages sent with a live key show up on your dashboard and count against your text message and email allowances.
- You should plan to rotate these keys on a regular basis. You can have more than one active key at a time. To revoke a key click the revoke button on the API Key page.
+ You should revoke and re-create these keys on a regular basis. You can have more than one active key at a time. To revoke a key click the revoke button on the API Key page.
- Use a team key for end-to-end functional testing.
+ Use a team and whitelist key for end-to-end functional testing.
- A team key lets you send real messages to members of your team and address/numbers that you have added to your whitelist. You will get an error if you use these keys to send messages to anyone else.
+ A team and whitelist key lets you send real messages to members of your team and addresses/numbers that you have added to your whitelist. You will get an error if you use these keys to send messages to anyone else.
- Messages sent with a team key show up on your dashboard and count against your text message and email allowances.
+ Messages sent with a team and whitelist key show up on your dashboard and count against your text message and email allowances.
- Use a test key to test the performance of your service and its integration with GOV.UK Notify under load.
+ Use a test key to test the performance of your service and its integration with GOV.UK Notify.
- Test keys don’t send real messages but do generates realistic responses. There’s no restriction on who you can send to or how many messages you can send per day.
+ Test keys don’t send real messages but do generates realistic responses.
+ There’s no restriction on who you can send to.
Messages sent using a test key don’t show up on your dashboard or count against your text message and email allowances.
@@ -63,23 +77,72 @@
By default, all messages sent with a test key will result in a delivered status.
- If you want to test failure statuses with a test key, use the following phone numbers and email addresses:
+ If you want to test failure responses with a test key, use the following numbers and addresses:
+ Integration testing
Types of API Keys
-
-
+ Live key
Team key
+ Team and whitelist key
Test key
- If you need to smoke test your integration with Notify on a regular basis, you should use the smoke test numbers and addresses below. -
The smoke test numbers and addresses will immediately return a successful response, but won’t send a real message and won’t produce a delivery receipt. @@ -87,7 +150,7 @@
You can use the smoke test numbers and addresses with any type of key. - If your smoke tests need to fetch a delivery receipt, then use a test key - and don’t use these numbers and addresses. + If your smoke tests need to get the status of a message, then use a test key and don’t use these numbers and addresses.