Authorization

Flexport
Prerequisites
To connect Nexla to Flexport, you need a Flexport account with API access and an API key. Flexport supports both a legacy API Key mechanism and a newer OAuth 2.0 credential approach. The Nexla connector uses API Key authentication, where the key is passed as a Bearer token in the Authorization request header.
Obtain a Flexport API Key
Flexport API keys are created and managed from within the Flexport Platform. To generate an API key:
-
Sign in to your Flexport account at app.flexport.com.
-
Click on Your Business in the top navigation bar, then select Settings from the dropdown menu.
-
In the Settings panel, navigate to the API Keys tab.
-
Click the Create Key button to generate a new API key.
-
Copy and save the generated API key immediately. For security reasons, the full key value may not be shown again after you leave this screen.
API keys provide access to your Flexport account data. Treat your API key as a password—do not share it publicly, commit it to source control, or expose it in client-side code. Revoke and regenerate the key immediately if it is ever compromised.
For enterprise or multi-user scenarios, Flexport also offers OAuth 2.0 credentials (Client ID and Client Secret) that generate short-lived Bearer tokens scoped to specific endpoints. The Nexla connector uses the API key method. For additional information about Flexport's authentication options, see the Flexport API Credentials tutorial.
Confirm API Access and Base URL
Flexport provides separate API surfaces for different product areas:
- Flexport API (freight forwarding, shipments, companies): base URL is
https://api.flexport.com - Logistics API (fulfillment, orders, inbounds, parcels, products): base URL is
https://logistics-api.flexport.com
When configuring your Nexla credential, enter the base URL that corresponds to the Flexport product area you intend to integrate with. For most logistics and fulfillment use cases, use https://logistics-api.flexport.com. For freight forwarding and shipment management use cases, use https://api.flexport.com.
Create a Flexport Credential
- To create a new Flexport credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
Credential Name & Description
-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
Resource descriptions are recommended but are not required. They should be used to provide information about the resource purpose, data freshness, etc. that can help the owner and other users efficiently understand and utilize the resource.
API Key Settings
-
Enter the Flexport API base URL in the Base URL field. This value defaults to
https://api.flexport.combut can be updated to match the Flexport API surface you are connecting to:-
Enter
https://api.flexport.comto connect to the Flexport freight forwarding and shipment management API. -
Enter
https://logistics-api.flexport.comto connect to the Flexport Logistics API for fulfillment, orders, products, parcels, and inbound shipments.
-
-
Enter the Flexport API key you generated in the Flexport Platform in the API Key field. Nexla will include this key as a Bearer token in the
Authorizationheader of all API requests sent to Flexport on behalf of this credential.The API key is transmitted securely and stored encrypted within Nexla. Nexla automatically prefixes the key with
Bearerwhen constructing theAuthorizationheader, so you only need to enter the raw key value here.
Save the Credential
-
Once all of the relevant steps in the above sections have been completed, click the Save button at the bottom of the overlay to save the configured credential.
-
The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.