Prerequisites
Setting up CodeMash API keys for accessing services
Last updated
Was this helpful?
Setting up CodeMash API keys for accessing services
Last updated
Was this helpful?
To make calls to the CodeMash servers and access your resources, you will need - a project ID and a secret key.
Your CodeMash Project ID or Project ID is our primary identifier to differentiate your project from all other CodeMash projects. You will use this in all your SDK initialization codes and API calls. You should not treat the Project ID as private.
Do not share this key!
Treat your REST API Key as though it is a password - do not add it to your app code or public repositories (e.g., GitHub), and do not share it with anyone.
Login to the .
Inside your CodeMash dashboard, select your project.
Inside your project settings, find settings called Project ID and Secret key.
For Project ID, copy it.
For Secret Key, press Regenerate and then copy generated token. The token will not be accessible after you close it; you must regenerate it.
The following shows how to store tokens using different languages and frameworks.
To store your tokens in private, use environment variables. This way, you won't expose your secret key to public places.
You can store your tokens in the appsettings.json (name can be different) file in your base project folder. CodeMash SDK expects the following format: