In this article, we will be going over how to generate and manage API Keys to connect outside applications to the site. The website's API allows for creating, reading, updating, and deleting information from the website by passing information to specific URLs or "API Endpoints". In order to make sure these requests are secure, a website's Admin must first generate a unique "API Key" to send with these requests.
- Currently, the API allows users to create, read, or delete members through API requests.
- Creating a member through the website's API requires a minimum of an email, password (minimum 6 digits), and subscription_id (existing Membership Plan ID#).
- When creating a member using the API, the settings of the assigned Membership Plan will be respected, such as a pre-selected top-level category and pre-selected listing type (unless overriding data is sent in the API request).
- When creating members using the API, the member limit on a website will be respected (100,000 Member Boost).
- If the allow_duplicate_member_emails Advanced Setting is disabled, members with duplicate emails will not be created.
- API requests are limited to 100 per minute.
How to Access the Tool
An API Key can be accessed and generated by navigating to Developer Hub >> Generate API Key:
How to Generate an API Key
Click on the Generate API Key button:
This will display a module to specify a name for the API Key that will be generated:
This will create a unique API Key token. Please make sure to save the generated token in a safe place as it will not be accessible again after the window is closed:
Now that the API Key is generated, please refer to the article down below to learn how to connect outside applications:
How to Disable or Delete an API Key
API Keys will display as Enabled by default and can be disabled if needed:
If an API Key is no longer needed, it can be deleted using the Actions dropdown:
Viewing the API Key Log
The API Key log can be accessed by clicking on the Details option:
This will display all the requests completed with this API Key:
The key “status” can have one of 2 values: "error", or "success". The value of the “message” when the status is “error” will explain the reason for the error.
There are three types of completed requests; create, fields, and verify. The details of any items in the log can be seen by clicking on the Detail button:
A Create request will be an indication that the member with the following info was created on the site:
A Fields request will display all the available default member fields from the users_data table and and custom member fields that have data saved in the users_meta table. The custom fields will vary depending on the website:
A Verify request allows a user to send a blank request with just the API Key to verify the API Key is valid:
There are also different error messages that may be returned if a request does not generate a successful response.
429 indicates the API request limit was reached on the site:
400 indicates a bad request like maximum member limit reached:
405 indicates an Invalid Request Method: