An API key is a code that is used to identify and authenticate your Lob account with us. You can use this key to unlock the ability to send API calls to help you send personalized mail or verify addresses with us in bulk. Your API key tells Lob that those mail pieces are yours!
In order to find your API Keys, follow these steps:
- Log into your Lob account to access your dashboard
- In the top right corner of your dashboard, click on your account name
- Click on “Settings”
- Click on “API Keys” tab and you'll be able to access both your Live and Test API keys
When leveraging your API Keys, if you are referencing them and occasionally rotating them for security purposes, be sure that you reference the new API keys that are provided. Failing to update to the new keys will result in potential errors.
Difference between a Live and Test API key
Any requests sent with your Test API key will not be mailed or charged against your account, which makes it perfect for testing your integration, your files, and verifying addresses without worrying about getting charged. On the other hand, when you send a request with your Live API key, your API requests will be charged per usage, will count against your subscription’s limits, and mailpieces will be sent to production for printing.
Difference between Secret API Keys and Publishable API Keys
Secret Keys can be leveraged to create both address verification and print and mail resources for the account, so should not be used in front-end applications or shared generally.
Publishable Keys can't be used to create print and mail resources; this limits their use to only address verification requests. You can use these keys to create something similar to our address verification demo, with the assurance that no bad actor will be able to submit print and mail requests through your application/service if they have access to this key.