API keys allow miniExtensions to integrate with third-party services like OpenAI's ChatGPT, Google Maps and others. In this article we will explain how to add API keys to your workspace and where to go to find or generate your own key, depending on which service you want to use.
Once you've added your API keys, you can choose which one to use with your automations using the API key picker in the automation's configuration. Simply select the appropriate key and you're all set!
API keys can only be added or edited by collaborators with the Admin or Owner role. Members do not have access to these settings, but can still use existing keys.
How to add API Keys
To add an API key to your workspace, first locate the API keys section on the settings page. Make sure to select the correct workspace on the left! You can then hit the + button to add a new key:
A modal will now appear that allows you to enter the details for your API key:
API Key Name: This is used to identify this particular API key in your workspace.
API Key Type: Select the type of API key you would like to add here. Some services may need more than one API key to function (e.g. Stripe), so you will need to add multiple keys, one for each type!
API Key Value: Paste the API key's actual value here. This is usually a long string of seemingly random characters.
API Key Description: This is an optional bit of information to help identify this specific API key in your workspace.
If you have multiple keys for the same third-party service please make sure that your API Key Name and Description allow you to identify the correct one!
How to get API Keys for different Services
The method by which you can obtain API keys varies for each third-party service. We provide links to the relevant pages below, for your convenience.
OpenAI
OpenAI API keys are used for all automations related to GPT. To create an API key go here, select the correct organization and project in the top left and then click on "Create New Secret Key" in the top right. The key should start with "sk-". You will also need to set up billing in your account settings, which you can access in the top right corner as well.
Some models may require a certain account tier. Please have a look at OpenAI's documentation to learn more about this.
Anthropic
Please follow the instructions outlined here to get started.
xAI
Sign up at x.AI and go to the API console to create or select an API key.
Bitly
You can generate your generic access token for Bitly here.
Google Maps
You can follow the instructions here to get started. Make sure you go through the "Before you begin" section first. Once you have your API key, find the following APIs and make sure they are enabled:
Maps JavaScript API
Geocoding API
Application restrictions may cause issues with your API key so we recommend deactivating them if you run into any problems.
Stripe
You can follow the instructions here. You will find two key types in the Standard Keys section of your Developers dashboard: publishable and secret. You will need to add both of them to your miniExtensions workspace for your Stripe integration to function! Please make sure you use a matched pair of keys, i.e. both the publishable and secret keys for either test or live mode, as you will run into an error when using one test mode key and one live mode key together.
For Stripe, please make sure you use the test mode keys first to ensure that everything is set up correctly before you process real transactions! Only then should you replace the test keys with the live mode keys in your miniExtensions workspace. On Stripe, you can switch between test and live mode at the top of the page. This will show you the test mode and live mode API keys, respectively.
If you run into this error:
stripe.redirectToCheckout: the provided sessionId is for a test mode Checkout Session, whereas Stripe.js was initialized with a live mode publishable key.
please make sure that you are using the correct keys and that both of them are for either live mode or test mode.
Sight Engine
Please follow these instructions from the Sight Engine documentation. You will need to add both the Sight Engine User ID and Secret to your miniExtensions workspace for this integration to work.
Google Service Account JSON
This API key type is used for Google Translate. Follow the instructions here to create a project, enable billing for it, enable API for Translate, and create a service account. After you create the service account, create a key on it, then choose "JSON", and then copy the contents of the file and paste them in the API Key Value field.
eSignatures.io
Sign up at esignatures.io, then find your secret token under "API & Automation" here.
Remove.bg
Pixabay
Simply go to this page on Pixabay and scroll down to the Search Images section. There, you will see your API key under Parameters. If you don't have an account yet or are not logged in, you can do either right there!
Barcode Lookup
Sign up at barcodelookup.com then find your API key under "Quick Start Guide" here.
Custom API Key
Custom API keys are used by scripting automations and can be used for services for which we do not have a specific API key type set up.