API Keys & Environments

Environments

There are three environments in Miso:

  • Playground, a read-only tutorial environment that anyone can use to explore Miso features with sample data.
  • Development, for staging, QA, and experimentation.
  • Production, for managing your live integration with Miso.

Accessing your environments programmatically

You can access a Miso environment by passing in the corresponding API key in your API calls. There is one publishable key and one secret key per environment. The API keys are per team (not per user).

Accessing your environments in Miso’s dashboard

In Miso, you are always viewing the data and configuration for one environment at a time. To switch between your environments, use the dropdown in the upper left-hand corner.

API Keys

There are two types of keys associated with each of your environments: A secret API key and a publishable API key. You can find the API keys in Miso .

Use your API keys

There are two ways to use the keys in your API calls:

  • Pass it as a request parameter (api_key)
  • Pass it as a request header (X-API-KEY)

For example, to pass the key as a parameter:

curl -X POST -d ... https://api.askmiso.com/v1/interactions?api_key={{your_api_key}}

To pass the key as a header:

curl -X POST -H “X-API-KEY={{your_api_key}}” -d ... https://api.askmiso.com/v1/interactions

Publishable API key

Use your publishable API key to call Miso's APIs from your front-end code. This key has limited access to APIs and is safe to be exposed in public. You can use it to send user interaction events from the browser using Miso's Interactions Upload API .

With the publishable API key, you can also access search and recommendation APIs. Note that when you specify user_id in the payload, you have to supply a corresponding user_hash as well. Please see Keeping your data secure for further information.

Publishable API keys provide protection against bot traffic. If you use tools like Postman or the curl command to test the APIs locally and encounter a block, use the secret key instead.

Keep in mind that once you include or use any API key in your front-end code, it becomes public. In order to keep the secret API key secure, you should only use a publishable API key in public areas, such as browsers or client devices.

Secret API key

You can access every Miso API endpoint with your secret API key.

It is important to keep the secret API key secure and only use it on a back-end server. Never expose the key in client-side JavaScript code, a public repository, a browser, or client device. If the private key is compromised, you can revoke it in Miso and get a new one.

Publishable API KeySecret API Key
API AccessInteraction upload, Search(with user_hash), Recommendation (with user_hash)All APIs
Safe to exposeYesNo
Bot detectionYesNo
Where to useFront-endBack-end, Postman, curl
Icon/Activity Icon/Add Icon/API Icon/Arrow/Down Icon/Arrow/Left Icon/Arrow/Right Icon/Arrow/TopRight Icon/Arrow/Up Icon/Bento Icon/Billing Icon/Bin Icon/Book Icon/Bookmark/Default Icon/Bookmark/Filled Icon/Calendar Icon/Caret/Down Icon/Caret/Up Icon/Chavron/DownIcon/Chavron/LeftIcon/Chavron/RightIcon/Chavron/UpIcon/Checknox/CheckedIcon/Checknox/Unchecked Icon/Checklist Icon/Chip Icon/Clipboard / Copied Icon/Clipboard/Default Icon/Clock/Stopwatch Icon/CMD Icon/Data/Catalog Icon/Data/Engine Icon/Data/Group Icon/Data/Interact Icon/Data/Users Icon/Dive Icon/Docs/Key Icon/Dojo Icon/Email Icon/Env/Development Icon/Env/Playground Icon/Env/Prod Icon/Folder Icon/Fullscreen/Collapse Icon/Fullscreen/Expand Icon/Guides/Multiple Icon/Guides/Single Icon/Hashtag Icon/Heart/Outline Icon/Heart/Solid Icon / Cart z Icon / Click Icon / Clock Icon / Data Icon / Doc Icon / EmptyCart z Icon/Social/Facebook Icon / Genome Incognito Icon / Money Icon/Social/ProductHunt Icon / Search Icon/Social/Twitter Icon / User Icon/Info/Error Icon/Info/Info Icon/Info/Question Icon/Info/Warning Icon/Interact/Download Icon/Interact/Edit Icon/Interact/External v2 Icon/Interact/External Icon/Interact/Filter Icon/Interact/Logout Icon/Interact/Options Icon/Interact/Re-order Icon/Interact/Reload Icon/Interact/Remove Icon/Interact/Replace Icon/Interact/Search Icon/Interact/Shuffle Icon/Interact/Undo Icon/Interact/Upload Icon/Interact/Video Icon/Invoice Icon/Loading Icon/Loading Icon/Lock/Locked Icon/Lock/Unlocked Icon/Lock Icon/Mapping Menu Icon/Notification Icon/Overview Icon/Person/Team Icon/Person/User Icon/Plan/Enterprise Icon/Plan/Growth Icon/Plan/Startup Icon/Plan/Trial Icon/Recipe Icon/Rocket Icon/Settings/App Icon/Settings/User Icon/Settings Icon/Shrine Icon/Sidebar/Close Icon/Sidebar/Open Icon/Slideout Icon/Sort/Ascending Icon/Sort/Default Icon/Sort/Descending Icon/Star/Filled Icon/Star/Outlined Stopwatch Icon/Support Icon/Tag Icon/Interact/Thumb/Dislike Icon/Interact/Thumb/Like Icon/Tick Icon/Trend/New Icon/Trend/Trending Icon/Tutorial Icon/Lock/Unlocked Icon/View/Grid Icon/View/List Icon/Watchlist/Add