- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
API Key Module
The API Key Module provides API-key-related features in your Medusa and Node.js applications.
How to Use API Key Module's Service#
Use the API Key Module's main service by resolving from the Medusa container the resource Modules.API_KEY
imported from @medusajs/framework/utils
.
For example:
Features#
API Key Types and Management#
Manage API keys in your store. You can create both publishable and secret API keys for different use cases, such as:
- Publishable API Key associated with resources like sales channels.
- Authentication token for admin users to access Admin API Routes.
- Password reset tokens when a user or customer requests to reset their password.
Token Verification#
Verify tokens of secret API keys to authenticate users or actions, such as verifying a password reset token.
Revoke Keys#
Revoke keys to disable their use permenantly.
Roll API Keys#
Roll API keys by revoking a key then re-creating it.
Was this page helpful?