Authentication
Dopt authenticates your API requests using your API key. Any API requests made without authentication or using an incorrect key will return a 401 error.
Each environment comes with its own unique users API key and blocks API key. Since environments are specific to a workspace, so are these API keys.
To get your API keys for a given environment, navigate to the Settings page and then click Environments. Select the environment you would like to grab API keys for.
Users API keys are always prefixed with users- and blocks API keys are always prefixed with blocks-.
The Users API key is private i.e. we’ll only display it once and then force you to regenerate it if you want to see it again. This is a nod to the fact that the Users API is slightly more powerful than the Blocks API key. That being said, it’s very much up to you where you want to identify users.