Skip to content

Commit 2b02abe

Browse files
committed
feat: add link to registration form within api key form
1 parent bb77905 commit 2b02abe

File tree

1 file changed

+31
-23
lines changed

1 file changed

+31
-23
lines changed

src/server/admin/templates/request.html

+31-23
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1>Register New Delphi Epidata Key</h1>
2424
<div class="g-recaptcha" data-sitekey="{{recaptcha_key}}"></div>
2525
{% endif %}
2626
<button class="btn btn-primary" type="submit">
27-
Request API Key
27+
Generate New API Key
2828
</button>
2929
</form>
3030
{% else %}
@@ -34,29 +34,37 @@ <h1>Successfully requested a new API key</h1>
3434
</p>
3535
<textarea readonly class="form-control">{{api_key}}</textarea>
3636

37-
<h2>Authentication options</h2>
38-
39-
<h3>Via request parameter</h3>
40-
<p>
41-
The request parameter <code>api_key</code> can be used to pass the api key to the server. Example:
42-
</p>
43-
</p>
44-
<a href="https://delphi.cmu.edu/epidata/covidcast/meta?api_key={{api_key}}">http://delphi.cmu.edu/epidata/covidcast/meta?api_key={{api_key}}</a>
37+
<section>
38+
<h2>Authentication options</h2>
39+
<h3>Via request parameter</h3>
40+
<p>
41+
The request parameter <code>api_key</code> can be used to pass the api key to the server. Example:
4542
</p>
46-
<h3>Via Basic Authentication</h3>
47-
<p>
48-
Another method is providing basic authorization with the username <code>epidata</code> and the password the api key
49-
</p>
50-
<pre>
51-
<code>curl -u 'epidata:{{api_key}}' https://delphi.cmu.edu/epidata/covidcast/meta</code>
52-
</pre>
53-
<h3>Via Bearer Token</h3>
54-
<p>
55-
Another method is providing bearer token in the header
56-
</p>
57-
<pre>
58-
<code>curl -H 'Authorization: Bearer {{api_key}}' https://delphi.cmu.edu/epidata/covidcast/meta</code>
59-
</pre>
43+
</p>
44+
<a href="https://delphi.cmu.edu/epidata/covidcast/meta?api_key={{api_key}}">http://delphi.cmu.edu/epidata/covidcast/meta?api_key={{api_key}}</a>
45+
</p>
46+
<h3>Via Basic Authentication</h3>
47+
<p>
48+
Another method is providing basic authorization with the username <code>epidata</code> and the password the api key
49+
</p>
50+
<code>
51+
<pre>curl -u 'epidata:{{api_key}}' https://delphi.cmu.edu/epidata/covidcast/meta</pre>
52+
</code>
53+
<h3>Via Bearer Token</h3>
54+
<p>
55+
Another method is providing bearer token in the header
56+
</p>
57+
<code>
58+
<pre>curl -H 'Authorization: Bearer {{api_key}}' https://delphi.cmu.edu/epidata/covidcast/meta</pre>
59+
</code>
60+
</section>
61+
<section>
62+
<h2>Important Notes</h2>
63+
<p>
64+
This API key is rate limited to XXX requests per hour.
65+
In order to lift this limit you need to register your API key using this <a href="https://docs.google.com/forms/d/e/1FAIpQLSe5i-lgb9hcMVepntMIeEo8LUZUMTUnQD3hbrQI3vSteGsl4w/viewform?usp=pp_url&entry.1976959461={{api_key}}">Register my API key</a> form.
66+
</p>
67+
</section>
6068
{% endif %}
6169
</div>
6270
</body>

0 commit comments

Comments
 (0)