API Key Generation
You need to generate an API Key before using the Public API.
How to Generate
- Sign in to InspireMe with your Google account.
- Click "My Quotes" from the profile menu in the header.
- Click "Settings" in the left sidebar.
- In the "API Key Management" section, click the [Generate API Key] button.
- Enter a name for your key and create it.
⚠️ Warning: The generated API Key is shown only once at creation time. Make sure to copy it to a safe place. If lost, you will need to delete it and create a new one.
Limitations
- Each user can create up to 1 API Key.
- API Keys can be deactivated or deleted from the settings page.
API Key Format
Generated API Keys follow this format:
im_live_<random string>
Example: im_live_abc12345def67890...
- Keys start with the
im_live_prefix to identify them as InspireMe API Keys. - The total length is approximately 40 characters.
Security Best Practices
- Manage your API Key as an environment variable. Never include it directly in source code.
- Do not expose your API Key in frontend (browser) code. Always call the API from the server side.
- If your key is compromised, immediately delete and regenerate it from the settings page.
- Deactivate unused keys to prevent unnecessary access.
Expiration Policy
You can choose an expiration period when creating an API Key.
| Option | Description |
|---|---|
| No expiration | Valid until manually deleted (default) |
| 30 days | Expires 30 days after creation |
| 90 days | Expires 90 days after creation |
| 180 days | Expires 180 days after creation |
| 1 year | Expires 365 days after creation |
When using an expired API Key, the following error is returned:
{
"error": {
"code": "API_KEY_EXPIRED",
"message": "API key has expired. Please generate a new key."
}
}