Background
There are two ways for you to enable your user to create their own shipping labels using Shipping Elements. Shipping Elements supports both gray label and white label integrations.- Using a white label integration means that you create and manage you users accounts using Shippo Platforms. Shippo bills your account and you’re responsible for billing users. This provides a seamless experience for your user. You have access to all account details including access keys.
- Using a gray label integration means that you guide your user to create their own Shippo account that you have access to using OAuth. Shippo will bill your users directly.
White label integration
If you have not already, review our guide on Shippo Platform accounts. You must have a Platforms account to create and use Managed Shippo Accounts.1. Retrieve your user’s Shippo Account ID
When you create a Shippo Managed account for your user, the response includes anobject_id that you will use to reference that account. This is the Shippo Account ID that you can use to make API calls representing that account. When you create the account, you should save this object_ id along with your users account credentials.
If you need to retrieve a Shippo Account ID of an account, you can request a list of all your Managed Shippo Accounts.
cURL
object_id for each account.
2. Generate your own JWT using direct authorization API
To generate a JWT for a Managed account, call theembedded/authz/ endpoint and set the object_id from the previous step to the SHIPPO-ACCOUNT-ID in the header of the call.
cURL
token is the JWT and expires_in is a unix timestamp representing when the token expires.
Get your OAuth key
If you have not already, follow the steps in our guide to request your OAuth key and get access to a Bearer Token.Generate your own JWT
There are 2 ways you can generate your own JWT.Direct Authorization API
The first way to generate your JWT is to call the/embedded/authz/ endpoint.
Send the following request. Remember to replace <OAUTH_BEARER_TOKEN> with your Bearer Token.
token is the JWT and expires_in is a unix timestamp representing when the token expires.
User Server Side Remote Procedure Call to generate JWT
The second way to generate your JWT is to use RPC.Validate your JWT
JWT works the same as an API token. To test your generated JWT, call the list all carrier parcel templates endpoint. Remember to replace<JWT_TOKEN> with the token you have generated.