{"id":218440,"date":"2025-01-16T09:12:57","date_gmt":"2025-01-16T09:12:57","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/rest-api-key-authentication\/"},"modified":"2025-01-16T09:18:52","modified_gmt":"2025-01-16T09:18:52","slug":"rest-api-key-authentication","status":"publish","type":"plugin","link":"https:\/\/es.wordpress.org\/plugins\/rest-api-key-authentication\/","author":15306561,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"1.0","tested":"6.7.5","requires":"5.0","requires_php":"7.2","requires_plugins":null,"header_name":"REST API Key Authentication","header_author":"Kamal Hosen","header_description":"Adds API key-based authentication for the WordPress REST API.","assets_banners_color":"1b1a67","last_updated":"2025-01-16 09:18:52","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/kamalhosen.com","rating":0,"author_block_rating":0,"active_installs":20,"downloads":996,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"ikamal","date":"2025-01-16 09:18:52"}},"upgrade_notice":{"1.0":"<p>Initial release. Add secure API key-based authentication to your REST API.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3223428,"resolution":"128x128","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3223428,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3223428,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3223428,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3223428,"resolution":"3","location":"assets","locale":""}},"screenshots":{"1":"<p><strong>API Key Management Interface<\/strong><br \/>\nManage API keys with a simple interface, including options to create and delete keys.<\/p>","2":"<p><strong>Generated API Key Popup<\/strong><br \/>\nPopup showing the API key after generation, with an option to copy it to the clipboard.<\/p>","3":"<p><strong>REST API Authorization Example<\/strong><br \/>\nExample of how to use the API key in the <code>Authorization<\/code> header.<\/p>"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1912,230801,237040,23853,600],"plugin_category":[54],"plugin_contributors":[160257],"plugin_business_model":[],"class_list":["post-218440","plugin","type-plugin","status-publish","hentry","plugin_tags-access-control","plugin_tags-api-authentication","plugin_tags-api-key","plugin_tags-rest-api","plugin_tags-security","plugin_category-security-and-spam-protection","plugin_contributors-ikamal","plugin_committers-ikamal"],"banners":{"banner":"https:\/\/ps.w.org\/rest-api-key-authentication\/assets\/banner-772x250.png?rev=3223428","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/rest-api-key-authentication\/assets\/icon-128x128.png?rev=3223428","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/rest-api-key-authentication\/assets\/screenshot-1.png?rev=3223428","caption":"<p><strong>API Key Management Interface<\/strong><br \/>\nManage API keys with a simple interface, including options to create and delete keys.<\/p>"},{"src":"https:\/\/ps.w.org\/rest-api-key-authentication\/assets\/screenshot-2.png?rev=3223428","caption":"<p><strong>Generated API Key Popup<\/strong><br \/>\nPopup showing the API key after generation, with an option to copy it to the clipboard.<\/p>"},{"src":"https:\/\/ps.w.org\/rest-api-key-authentication\/assets\/screenshot-3.png?rev=3223428","caption":"<p><strong>REST API Authorization Example<\/strong><br \/>\nExample of how to use the API key in the <code>Authorization<\/code> header.<\/p>"}],"raw_content":"<!--section=description-->\n<p><strong>WP REST API Key Authentication<\/strong> adds a simple API key-based authentication method to the WordPress REST API. This plugin is perfect for developers who want to interact with the REST API securely without relying on complex OAuth authentication mechanisms.<\/p>\n\n<h3>Key Features:<\/h3>\n\n<ul>\n<li><strong>Multiple API Keys<\/strong>: Create and manage multiple API keys with custom names.<\/li>\n<li><strong>Secure API Key Storage<\/strong>: API keys are hashed and securely stored in the WordPress database.<\/li>\n<li><strong>Single Display for Security<\/strong>: API keys are shown only once after creation.<\/li>\n<li><strong>REST API Access Control<\/strong>: Authenticate requests by including an API key in the <code>Authorization<\/code> header.<\/li>\n<li><strong>Admin Interface<\/strong>: Manage API keys with a user-friendly admin page.<\/li>\n<li><strong>Copy to Clipboard Popup<\/strong>: Easily copy generated API keys with a built-in popup.<\/li>\n<\/ul>\n\n<p>The plugin is lightweight and integrates seamlessly with WordPress.<\/p>\n\n<h3>Usage<\/h3>\n\n<ol>\n<li><p><strong>Generate an API Key<\/strong>:<\/p>\n\n<ul>\n<li>Go to <strong>API Keys<\/strong> in the WordPress admin menu.<\/li>\n<li>Enter a name for the API key and click \"Generate API Key\".<\/li>\n<li>The API key will appear in a popup. Copy it immediately, as it will not be displayed again.<\/li>\n<\/ul><\/li>\n<li><p><strong>Use the API Key<\/strong>:<\/p>\n\n<ul>\n<li>Include the API key in the <code>Authorization<\/code> header of your REST API requests:\n <code>Authorization: Bearer YOUR_API_KEY<\/code><\/li>\n<\/ul><\/li>\n<li><p><strong>Delete API Keys<\/strong>:<\/p>\n\n<ul>\n<li>To revoke access, delete an API key from the <strong>API Keys<\/strong> admin page.<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<h3>License<\/h3>\n\n<p>This plugin is licensed under the GPLv2 or later. See the License URI for details.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download the plugin ZIP file.<\/li>\n<li>Go to your WordPress admin dashboard and navigate to <strong>Plugins &gt; Add New<\/strong>.<\/li>\n<li>Click on the <strong>Upload Plugin<\/strong> button and select the ZIP file.<\/li>\n<li>Click <strong>Install Now<\/strong> and then activate the plugin.<\/li>\n<li>Navigate to <strong>API Keys<\/strong> in the admin menu to start managing your API keys.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20are%20api%20keys%20stored%3F'><h3>How are API keys stored?<\/h3><\/dt>\n<dd><p>API keys are hashed using PHP's <code>password_hash<\/code> function and stored securely in the WordPress database. The raw key is only shown once upon creation.<\/p><\/dd>\n<dt id='what%20happens%20if%20i%20lose%20an%20api%20key%3F'><h3>What happens if I lose an API key?<\/h3><\/dt>\n<dd><p>If you lose an API key, you must generate a new one. The plugin does not store raw API keys for security reasons.<\/p><\/dd>\n<dt id='how%20do%20i%20authenticate%20a%20rest%20api%20request%3F'><h3>How do I authenticate a REST API request?<\/h3><\/dt>\n<dd><p>Include the API key in the <code>Authorization<\/code> header using the <code>Bearer<\/code> token format: Authorization: Bearer YOUR_API_KEY<\/p><\/dd>\n<dt id='can%20i%20create%20multiple%20api%20keys%3F'><h3>Can I create multiple API keys?<\/h3><\/dt>\n<dd><p>Yes, you can generate multiple API keys with custom names and manage them from the admin interface.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Added support for API key creation and deletion.<\/li>\n<li>Added REST API authentication using API keys.<\/li>\n<li>Added popup with \"Copy to Clipboard\" functionality for generated API keys.<\/li>\n<\/ul>","raw_excerpt":"A simple plugin to add API key-based authentication to the WordPress REST API. Manage multiple API keys and secure your REST API endpoints.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/218440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=218440"}],"author":[{"embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ikamal"}],"wp:attachment":[{"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=218440"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=218440"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=218440"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=218440"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=218440"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/es.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=218440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}