API Key & Environment
What's an API Key ?
An
Using a client_credentials flow you'll be able to authenticate your requests .
Here are the
Property Name | type | Description | Example |
---|---|---|---|
managed_tenant_domains | domain array | List of all organizations that this API key can work on | ['misapret', 'new-company'] |
allowed_database | string | Which environment that the API Key can work on on above domain resources | sandbox |
name | string | Friendly name of the API key to let you find it easier | "My sandbox API key for xy company" |
tag | string | Auto generated slug from name value | my-sandbox-api-key-for-xy-company |
permissions | List of permissions | Determines for which actions on which resources you want this API Key to have rights on |
So you can, for example, creates an
sandbox
environment only allowed to create user .1. Where can I find my API Key?
During your onboarding you get a sandbox API Key with full authorizations on all resources.
To find this Key:
- Login to your Cryptr Account on docs.cryptr.co.
- Once logged in, your key is located at the top of your home page.
For your production needs we strongly encourage you to create restricted access production
2. How to Safely Utilize Your API Keys
Cryptr does not keep created
You can always request new ones in case of loss or blacklist your
It's important that your Cryptr
CRYPTR_ACCOUNT_DOMAIN=communitiz-app
CRYPTR_CLIENT_ID=b7bde828-4df1-4f62-9a3a-d1541a2fc9e4
CRYPTR_CLIENT_SECRET=79cef058-530c-4c19-a12d-ff57ff5e592b
In a dedicated environment, remember to set the CRYPTR_SERVICE_URL
as environment_variable.
This ensures proper communication with the service and enables customization of service URL base on your environment.
Cryptr Service URL for dedicated instance
CRYPTR_ACCOUNT_DOMAIN=communitiz-app
CRYPTR_CLIENT_SECRET=79cef058-530c-4c19-a12d-ff57ff5e592b
CRYPTR_CLIENT_ID=b7bde828-4df1-4f62-9a3a-d1541a2fc9e4
CRYPTR_SERVICE_URL=https://comumnitiz-app.authent.me
3. How to Authenticate with Your API Key
Since your
client_credentials
Here is an example how to retrieve and access token :
curl -X POST '${cryptr_service_url}/oauth/token' \
-d grant_type="client_credentials" \
-d client_id="${cryptr_client_id}" \
-d client_secret="${cryptr_client_secret}" \
-d audience="communitiz-app" \
From this request you'l get an access_token
that you'll have to use as Authorization Bearer header in your requests.
For example if you want to create a new
curl -X POST '${cryptr_service_url}/api/v2/organizations' \
--header 'Authorization: Bearer eyJ...' \
-d name='New company' \
-d 'allowed_email_domains[]'='company.co'
What's next
Cryptr API Exploration with Postman
Discover how to authenticate and utilize the Cryptr collection requests with this guide.