A Services authentication provider that adds API-key access to an endpoint. Allows user selection for performing endpoint tasks.
1) Configure a user role:
URL: admin/structure/services/api_key_settings
Use this page to configure which user role should be used to display available users in the authentication configuration screen for an endpoint
2) Configure the API Key authentication settings for an endpoint
When setting up a new endpoint make sure the API Key Authentication option is checked under Authentication. Then edit the authentication settings, entering the API Key and selecting a user. Setting a user will mean that any requests to the endpoint with a valid API Key will perform all its actions as that user with the permissions defined for their role.
3) Making a request to the endpoint with a key
The module will look for either a request parameter or header (depending on how the module was configured) called api-key
and look to compare this value against the key defined for the endpoint. Any requests without this value or with an invalid value will be blocked.
Related Modules
Services API Keys Authentication: This module allows keys to be generated on a per-user basis, unlike this module which currently supports only one key per endpoint. However, we're open to adding support for multiple keys per endpoint. Please contribute to #2195767: Support for multiple API keys if interested.
Drupal 8/9
This module will also be the home for using an API key in Drupal 8, although Services is not required as it is no longer necessary. Track progress in #2869068: Drupal 8 release. Help is always appreciated.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Administration Tools, Integrations, Access Control
- 1,384 sites report using this module
- Created by Psycle Interactive on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 3.0.x-dev updated 25 Mar 2024 at 18:17 UTC
Development version: 7.x-1.x-dev updated 15 May 2017 at 20:38 UTC