πŸ”‘Authentication

Obtaining and Using an API Key from Subrise

To securely access and interact with the Subrise API, you'll need to obtain an API key. This key authenticates your requests and ensures that you have permission to retrieve or modify data via the API. Follow the steps below to get started with your API key.

How to Obtain Your API Key

  1. Sign Up for a Mid-Level Plan: To access the API key, you must be subscribed to the mid-level plan of Subrise. If you haven't upgraded yet, please visit the Subrise subscription page to select the mid-level plan.

  2. Navigate to the Settings Page: Once you're on the mid-level plan, log in to your Subrise account. From the dashboard, navigate to the settings page. You can typically find this option in the upper-right corner or in the main navigation menu.

  3. Access the API Key Section: In the settings menu, look for a section labeled "API Key" or "API Access." Click on this section to view your API key details.

  4. Generate or Copy Your API Key: If you haven't generated an API key yet, you'll see an option to create one. Follow the prompts to generate your key. If you've already generated a key, you should see it listed on this page. Use the copy function to copy the API key to your clipboard.

Applying Your API Key to Requests

Once you have your API key, you must include it in the header of every request you make to the Subrise API. This is how you authenticate your requests.

  • Header Name: X-API-KEY

  • Header Value: Your API key string

Here is an example of how to include your API key in a request using curl:

curl -X GET "https://api.subrise.com/desired-endpoint" -H "X-API-KEY: YourApiKeyHere"

API Key Scopes

Your API key comes with a specific scope that determines which endpoints you can access. The scopes are:

  • Read: Allows you to retrieve data from the API. You can make GET requests to endpoints that provide information but cannot modify any data.

  • Write: Grants you both read and write access. You can retrieve data as well as make POST, PUT, DELETE, and PATCH requests to modify data.

Ensure you're aware of your API key's scope and understand that attempting to perform actions outside of your key's scope will result in an error.

Best Practices for API Key Security

  • Do Not Share Your API Key: Treat your API key as a sensitive password. Do not share it in publicly accessible areas such GitHub, forums, or websites.

  • Limit Access: Only use your API key in server-side applications or secure environments. Avoid embedding it in client-side code where it can be easily extracted.

  • Rotate Keys Regularly: For added security, regenerate your API keys periodically through the Subrise settings page.

By following these guidelines, you can securely access the Subrise API and integrate its capabilities into your applications. If you encounter any issues or have questions about using your API key, please contact Subrise support for assistance.

Last updated