# Authentication Shippo authenticates your API requests using your account’s API keys. note If your request does not include a key, or includes a deleted or expired key, the Shippo API returns a `401 Unauthorized` error with the following responses, depending on the nature of the error. ```json { "detail": "Token does not exist" } ``` Or ```json { "detail": "Authentication credentials were not provided." } ``` ## Test mode and live mode You can make Shippo API calls in either test mode or live mode. When you use test mode, you have access to test data and can make test calls. When you use live mode, you have access to live data and can make live calls (like purchasing a label). Each mode has its own set of API keys. | Type | When to use | How to use | Considerations | | --- | --- | --- | --- | | Test mode | As you test and build your Shippo integration, use test mode with your test keys. In test mode, you can use all of the Shippo services like retrieving shipping rates and creating test labels without being charged. | Use your API test token for `Authentication` in [your API calls](#use-your-secure-key). | Rates requested in test mode may differ from actual rates in live mode. Data is not shared between test account and live account. For a full list of considerations, review our [testing guide](/docs/guides_general/testing#notes-about-test-mode) | | Live mode | When your integration is ready for production use live mode with your live tokens. In live mode, you can generate shipping rates and purchase real shipping labels. | Use you API live token for `Authentication` in [your API calls](#use-your-secure-key) | Your account will be charged for purchasing labels. | ## Get your API keys ### ![](/assets/step1.14ee6260337a0b326de06f1173e3703f933b52790e666cd390788635d3e7e0a6.9c1bb791.svg) Create your free Shippo account If you already have a Shippo account, skip ahead to [Step 2](#generate-your-secure-key). In your browser, open the address [https://apps.goshippo.com/join](https://apps.goshippo.com/join). Enter your name, email, a secure password, and click **Get Started**. Follow the prompts to complete your registration. ### ![](/assets/step2.37831ee18f1f0290fe49fb6b512319f7a374b18f4063f0302fe35b4afcd9816b.9c1bb791.svg) Generate your secure key Login to the [Shippo API portal](https://portal.goshippo.com/api-config/api) using your Shippo credentials. ![generate token UI](/assets/2_gen_token.b85060c650d4acb063cbf3ace5b1abaf9d3a42120a773845a618c2c9f3d5ee5a.4050d67f.png) In the **API Configuration** menu, select **Developer keys**. In **Developer Keys**, there are two options. **Live keys** and **Test keys**. Use **Live keys** for production ready use of the Shippo API. For testing and development, use the [Test key](/docs/guides_general/testing). * Click **Create new live key** for a live key. * Live keys begin with `shippo_live_`. * Click **Create new test key** for a test key. * Test keys begin with `shippo_test_`. Copy your API key and click **Close**. Note You can only see your full API key once. Store it in a secure place. If you lose your API key, you can generate a new one. Warning These keys give direct access to your Shippo account. You must store these securely. If you think your key has been compromised, use the dashboard to delete it and generate a new key. ### ![](/assets/step3.882dd6eb157abc25c1f2895637ba8769f3b55aa52288a40e94bd0d9550a670c5.9c1bb791.svg) Use your secure key To use your secure key, make an API call replacing `` with the key you have generated. ```shell curl https://api.goshippo.com/shipments/\ -H "Authorization: ShippoToken "\ -H "Content-Type: application/json"\ -d '{...}' ```