API Authentication: Difference between revisions

From Golden Retriever Wiki

No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 10: Line 10:


[[File:Generated API Key.png|thumb|center]]
[[File:Generated API Key.png|thumb|center]]


When using any of the API endpoints you will be required to pass a valid API Key as a header in the following format:
When using any of the API endpoints you will be required to pass a valid API Key as a header in the following format:


authorization: CgHxb18BvJu4IMSnGDrNXsfWHJISjT227JJFB2gwVDrCrKc7koY3wARyK4BiBvR7
  '''authorization: CgHxb18BvJu4IMSnGDrNXsfWHJISjT227JJFB2gwVDrCrKc7koY3wARyK4BiBvR7'''
 
For Example:
 
  '''curl -X GET -H "Content-Type: application/json" -H "authorization: CgHxb18BvJu4IMSnGDrNXsfWHJISjT227JJFB2gwVDrCrKc7koY3wARyK4BiBvR7" "<nowiki>https://api.thedog.io/dictionary</nowiki>"'''

Latest revision as of 16:22, 22 December 2023

In order to use the API you will need to generate an API Key from within the Admin Portal. Once logged into the Admin portal use the side menu to open the "My Profile" page.

Near the bottom of the page you will find a section where you can generate an API Key. Click on the "Generate API Key" button to generate a new API Key.

Once you have generated an API Key it will show up in the list. You will also be able to delete the key.


When using any of the API endpoints you will be required to pass a valid API Key as a header in the following format:

 authorization: CgHxb18BvJu4IMSnGDrNXsfWHJISjT227JJFB2gwVDrCrKc7koY3wARyK4BiBvR7

For Example:

 curl -X GET -H "Content-Type: application/json" -H "authorization: CgHxb18BvJu4IMSnGDrNXsfWHJISjT227JJFB2gwVDrCrKc7koY3wARyK4BiBvR7" "https://api.thedog.io/dictionary"