A WordPress plugin that provides encrypted API key functionality.
This plugin blueprint offers a simple way to manage encrypted API keys within your WordPress site. It also provides a custom REST endpoint for fetching external API data. The code is based on the article: How to Safely Store API Keys and Access Protected External APIs in WordPress.
- Admin settings page for API key management.
- Data encryption for added security.
- Custom REST endpoint for external API data fetching.
- Download the plugin from this repository.
- Upload the plugin to your WordPress site via the Plugins > Add New > Upload Plugin interface.
- Activate the plugin.
- Navigate to the API Keys submenu under the Tools menu to configure your API key.
- Set your API key in the provided settings page.
- Use the custom REST endpoint (
/wp-json/webshr/v1/fetch-external-api
) to fetch data from an external API.
This plugin requires at least WordPress 5.9 and PHP 7.4.
includes/
: Contains the PHP classes for data encryption, REST endpoint, and settings page functionalities.
Contributions are welcome! Please read the contributing guidelines to get started.
This project is licensed under the GPL-2.0 License - see the LICENSE.md file for details.