Authentication
Learn how to authenticate with Countercyclical's API.
Last updated
Learn how to authenticate with Countercyclical's API.
Last updated
All calls to the Countercyclical API require authorization using a query parameter called apiKey
in the API call. Here's what an example call might look like:
Users can find their API tokens by going to .
Each key you generate should look something like the following:
Be sure to take note of what your generated token is before closing the dialog as you will not be able to view it afterwards.
We recommend storing this value as an environment variable.
It's a good practice to roll your API keys once in a while for security purposes.
While we do not currently support "rerolling" the same API key, we recommend users generate a new API key with the same permissions they might otherwise have.
To make this easier, you can select from the dropdown menu on the right-hand side of any one of your API keys and select the "Roll as New Key" option.
Here's an example of what a call to get a member's Investments might look like: