Metrc has two types of API keys:
A global Metrc API key used to link GrowFlow with Metrc, and
Metrc user API keys used to communicate to Metrc which users made any updates to their Metrc data by way of GrowFlow
Users can have their actions reported to Metrc using a global Metrc API key that identifies only the Metrc Admin user for the license or they can configure personal Metrc API keys under User Settings.
Skip to a section in this article by clicking the section title below:
A. Find your global Metrc API key and enter in GrowFlow
Log in to Metrc with your Metrc Admin user's username and password.
2. Click on the user ID in the top right-hand corner of the screen.
3. On the dropdown menu, click "API keys".
4. On the API Keys page, your API key will populate in the box under Programmatic Access. If you do not see a number in the box, click "generate". You will also want to generate a new API key if you are experiencing errors with permissions in your GrowFlow account.
📣💥 Important! If you reset your API key by pressing "Generate," the new API key will need to be inserted into all your accounts. If you have many accounts, please contact support for help with managing your API keys.
5. Now that you have your API key, you will need to copy and then paste it into your GrowFlow account. (On your Metrc API key page, start copying the text above "API Keys", this will allow you to capture the entire key on your clipboard).
6. Follow these steps in GrowFlow to enter your API key:
Go to your upper right account menu to Account Settings
Under "Traceability Credentials," paste your API key into the box provided
Click Update Traceability Credentials
✨ Your global Metrc API key is synced!
B. Using your personal Metrc user API key
We now have a feature that allows users to have actions reported under their own API key so that not all GrowFlow changes are associated with a single global API key/user.
📣💥 Important! You must first be set up by your Metrc Admin user as a licensed employee user in your Metrc account and given permissions in the Metrc account before you complete the steps below.
Log in to Metrc with your unique user credentials
Click on your user ID in the top right-hand corner of the screen
On the dropdown menu, click "API keys"
On the API Keys page, your API key will populate in the box under Programmatic Access.
If you do not see a number in the box, click "generate". You will also want to generate a new API key if you are experiencing errors with permissions in your GrowFlow account.
Copy the API Key
In GrowFlow, go to your upper right menu to User Settings:
On the right will be the option to past the user API key described under (A) below:
A. User API Key
Select this option to use the user-specific Metrc API key for this user then paste the full API key in the box. Once entered, you will see the option to Test Connection. Click this to confirm the key is valid.
If valid, GF will display all the licenses that this API Key can be applied to in (C) below
B. Global API Key
If this is selected, the user will continue to use the global API Key to submit all updates to Metrc
C. Update key to all licenses you have access to
If this option is selected, then the API key saved in (A) will be applied to all licenses the key can be applied to (i.e., the User Settings will be adjusted across all of those instances of GF)
Click Update Key to save the Metrc API Key changes!
C. Notes about a failed connection
GrowFlow checks all API Keys daily to ensure they are still valid. If a User API Key is found to be invalid during these checks, we'll notify the user via a non-dismissible banner:
The user must adjust their API Key under their User Settings to either update their User API Key with a valid key or switch to the Global API Key. It will not automatically switch to the global API key.
Note this behavior will only be initiated during the daily API key check; if an API becomes invalid mid-day, Metrc access will fail and permission errors will be raised to the user attempting to perform actions involving Metrc, but the banner will not be raised.