Scrap Dragon API Keys

Scrap Dragon API Keys

API Keys

An api key allows for external applications or daemon processes to authenticate and get authorization to use the ScrapDragon.OpenApi.  It is a simpler authorization flow specifically used when the ability to perform some of the more complicated OAuth authorization flows cannot be accomplished. *

* This flow is not available when using Azure Active Directory.  To accomplish this, an application role is used instead.

Configuration

Enable Api Keys in System Settings

To use api keys, the system settings in the ScrapDragon client should be enabled to use api keys.  The following shows how to accomplish that.

1.       Open System Configuration

2.       Open System Settings


3.       Turn on “Use Api Keys”



Adding External Application as a User with an API KEY

A user in ScrapDragon client must be established to use an api key.  Moreover, that user must be an application.  This registration is needed for auditing purposes.

1.       Open Admin


2.       Open Users


3.       Add a new user by selecting the plus button pictured below


4.       Provide at least a first name and username to help identify the user.  Also, ensure Is Application is selected.


5.       The Api Keys section should be viewable now.  Add a new api key by selecting the plus button pictured below.


6.       Set a suitable name for the key and an expiration date.

    Click the save button highlighted below.



.       Copy the api key by highlighting the text or using the copy button highlighted below.  The api key is only shown at this point and cannot be viewed again.



REVOKING AN API KEY

1.       Edit the user with an established api key.  Select the revoke button pictured below.


USING THE API KEY TO Perform ScrapDragon.OpenApi Requests

1.       When making a request to the ScrapDragon.OpenApi, a specific header is required. The key of the header must be “X-API-KEY” and the value being the api key. The pictures below illustrates the header and the transport details.




A general request to the ScrapDragon.OpenApi with the api key is shown above.