API Authentication: Difference between revisions

From Golden Retriever Wiki

No edit summary
No edit summary
Line 14: Line 14:
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:
For Example:


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

Revision as of 16:07, 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"