Skip to main content

Authentication

The Authentication page details the necessary steps to authenticate your requests when using the CodeNOW API. To access protected resources and perform authorized actions, you'll need to include your API key in the request headers.

API Key Authentication

For API key authentication, you need to pass your unique API key in the request header with the key named X-Codenow-Api-Key. Your API key acts as your secure access token and ensures that only authorized users can interact with the CodeNOW API.

Obtaining an API Key

TBD: Link to documentation about API keys

API Key and RBAC

CodeNOW's API key authentication respects the Role-Based Access Control (RBAC) of the user to which the API key belongs. Each user in CodeNOW is assigned specific roles and permissions that determine what actions they can perform and what resources they can access.

When you use an API key to make API requests, the permissions granted to the user associated with that API key will apply. This means that if the user has limited access rights based on their role, the API key's actions will also be limited to those permissions.

It is crucial to understand the RBAC assigned to each user and the corresponding API key to ensure that API requests comply with the intended access levels and security requirements.

Include API Key in Request Headers

To use your API key for authentication, include it in the request headers of your API calls. Here's an example of how to add the X-Codenow-Api-Key header to your HTTP request:

curl -X GET \
-H "X-Codenow-Api-Key: YOUR_API_KEY" \
https://api.codenow.com/...

Note: Replace YOUR_API_KEY with the actual API key you obtained from the CodeNOW User profile.

With your API key included in the request headers, you are now authenticated to make authorized API calls to CodeNOW and access the protected resources based on the user's RBAC settings. Ensure you keep your API key secure and avoid sharing it publicly. If you suspect any unauthorized access or need to regenerate your API key, you can always return to your account settings in the CodeNOW dashboard to manage your API keys.

Remember to follow API best practices and securely store your API key to protect your CodeNOW resources and data. Happy coding with CodeNOW!