Contents

API Key Auth

API key authentication method helps the app users in verifying their users via an API key that passes with each API call. In Connect, API Key Authentication can also include other data required for running API, it will be used by Connect at the time of running integration. Now, whenever the Connect will run it will use the API key and the other details provided.

This authentication is similar to Basic Auth at Connect as credentials will be based on each API call in this case as well. The user will be required to provide the information of the API Key and other details such as Account name, site URL, etc. (as per your Apps requirement) in an Input form, thus you need to create an Input Form to get the required information. While designing the form, you can also add the help text to guide your users with proper direction to fetch the API key and other details of your app.

Where can API Key Authentication work: If your app identifies the account with the help of an API then the API key authentication fits best. There are certain categories of apps including weather, maps, content verification, file conversion, and other apps that require certain service accesses with more generalized content rather user-specific. And as it contains an input form, you can ask for more details from the user including what Basic Auth form provides at Connect.

Steps to Add API Key Auth in Connect Integration

While configuring authentication, select API Key, and click Save to set API key Auth as your authentication method of app integration.

  • Create an input form and ask for a user API key or other relevant details
  • To verify user credentials enter the test API call, it helps and checks user credentials while user add details
  • You can also add the labels to identify each account integrated.
  • Test the authentication before moving ahead and get testing credentials to test further steps during app integration at the Connect developer platform.

Add Authentication Fields

To begin with, you need to add authentication fields and build a form to get every information required along with an API key to authenticate users while letting them connect to their account in your app at Connect. You need to look into your API documentation to get to know of all the fields that would be required along with the account, domain names, and other vital information at the time of integration. You can also make a note of steps that the user would require to follow in order to fetch the information required. Sometimes such information is not easy to find in the menus, a help text in the Input form can assist the users in finding the information and implementing it during integration. To import each field in your form click Add fields button and fill the details of those fields. Maintain the order of the fields by adding the most common one first and plan it before adding fields at Connect as you cannot reorder them (Only delete and re-add in a particular fashion).

Each input field will need to have a Key, a name that your API uses for referring to this field. Keep the same name as it is being used in API.

Enter information in all the fields properly:

  • Label: A common name for the field, enter the name which is shown in your apps UI for this field.
  • Key: Provide the field key, that is to match it with the backend of your app.
  • Is this field required? Check if yes: Tick the checkbox to mark the field as required, the user will not be able to authenticate without filling this information.
  • Type:
    string
    is used as a common text field for input fields in Connect, you can choose from different options given in drop-down, choose a
    password
    to encrypt the data entered by the user.
  • Help Text: You can add details to help your app users by navigating them through the options where they can find the required information. You can also use Markdown to format the text and provide hyperlinks for detailed information.
  • Default Value: You can add a value to be used as a fallback. It is an optional field that is returned rather than null or value while running the Connect. This value will be only used at the time of Connect initiation and not at the time of running it if the field is marked as required.

Connect will list the input fields once added, it will show labels, key, type, and required status for your authentication setting. You can edit the field using the gear icon and also you can delete the field if required.

Once you have added all the required fields in the form you need to continue to test API calls and continue setting up authentication at Connect.

Configure Test Request

05_API_Auth_Config_test_request

Next, Connect needs to test the API key and all input field data that the user enters to enable a successful API call. For this, just add an API call to your API without any configuration required to complete step two commonly

/user
or
/me
call is used, give URL for API call, and set its call type.

Connect will automatically fetch and include API keys with other input fields from your Input form in URL Params. If you need additional changes for your API to set data in the header then click the Show Options link and edit the details as per your requirement.

08_API_Auth_Config_test_request_Show_Options

Click the Save & Continue button to complete your authentication settings.

09_API_Auth_Config_test_request_Show_Options_success

Now, test your authentication, click the “Test Authentication” button and add the test account details to test if everything is running smoothly. All your API calls will be tested for a response from the app, a report will be generated on the basis of test results. If any error is encountered, it is explained in the report, you can check and resolve the error and test your integration again. Once everything runs smoothly, click the “Save & Finish” to complete API key Authentication.

10_API_Auth_Config_Save_Finish