mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-28 22:30:44 -05:00
In research we’ve seen people mix up the service ID and API key because they’re both 36 character UUIDs. We can’t get rid of the service ID because it’s used to look up the API key. Instead, we should change API key to be one long string, which contains both the service ID, API key and (optionally) the name of the key. For example: ``` casework_production-8b3aa916-ec82-434e-b0c5-d5d9b371d6a3-dcdc5083-2fee-4fba-8afd-51f3f4bcb7b0 ``` We still need to keep the old, separate, key and service ID for a while until people have updated their clients. But they’re now both on this page, rather than on two separate pages, which should make for less fussing anyway. This shouldn’t be rolled out until the new clients are available. - [ ] https://github.com/alphagov/notifications-python-client/pull/36 - [ ] https://github.com/alphagov/notifications-node-client/pull/10 - [ ] https://github.com/alphagov/notifications-ruby-client/pull/15 - [ ] https://github.com/alphagov/notifications-java-client/pull/38 - [ ] PHP????
49 lines
1.1 KiB
HTML
49 lines
1.1 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/page-footer.html" import page_footer %}
|
||
{% from "components/api-key.html" import api_key %}
|
||
|
||
{% block page_title %}
|
||
New API key – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
|
||
<h1 class="heading-large">
|
||
New API key
|
||
</h1>
|
||
|
||
<p>
|
||
Copy your key to somewhere safe. You won’t be able to see it again
|
||
once you leave this page.
|
||
</p>
|
||
|
||
<div class="bottom-gutter-2">
|
||
|
||
{{ api_key(
|
||
'{}-{}-{}'.format(key_name, service_id, secret),
|
||
'API key'
|
||
) }}
|
||
|
||
{{ page_footer(
|
||
secondary_link=url_for('.api_keys', service_id=current_service.id),
|
||
secondary_link_text='Back to API keys'
|
||
) }}
|
||
|
||
</div>
|
||
|
||
<h2 class='heading-medium'>For older API clients</h2>
|
||
|
||
<p>
|
||
If the client you’re using needs a service ID and an API key,
|
||
use these values:
|
||
</p>
|
||
|
||
<div class="bottom-gutter">
|
||
{{ api_key(service_id, 'Service ID', thing='service ID') }}
|
||
</div>
|
||
|
||
{{ api_key(secret, 'API key') }}
|
||
|
||
{% endblock %}
|