Magento 2 + AtoShip
Connect your Magento 2 store to atoship using the built-in Integration system. No extension to install — Magento handles the OAuth handshake natively.
How it works
Magento 2 has a built-in Integration feature that supports OAuth 1.0a. You create an Integration inside your Magento admin, paste in two URLs from atoship, and click Activate. Magento and atoship exchange tokens automatically — no coding, no extensions, no API keys to copy-paste.
Create an Integration in Magento
Paste the Callback URL and Identity Link URL
Click Activate
Magento exchanges OAuth tokens with atoship
Orders sync automatically
Buy labels in atoship, tracking writes back to Magento
Setup
Step 1 — Create a new Integration
In your Magento admin, go to System → Integrations and click Add New Integration.
https://atoship.com/api/channels/magento/callbackhttps://atoship.com/api/channels/magento/identity
Fill in the Name, Callback URL, and Identity Link URL. The Email field is optional.
Step 2 — Set API permissions
Click the API tab on the left. Under "Resource Access", either select All or grant access to these specific resources:
- Sales — Orders, invoices, shipments, credit memos
- Catalog — Products (for weights & dimensions)
- Stores — Store configuration & views
Tip: "All" is the simplest option and ensures all sync features work. You can restrict it later if needed.
Step 3 — Save and Activate
Click Save to create the Integration. Then find it in the list and click the Activate link. Magento will ask you to confirm — click Allow.
Important: Make sure you're logged into your atoship account in the same browser before clicking Activate. Magento redirects your browser to atoship's Identity Link URL, and atoship needs your session to associate the store with your account.
Step 4 — Verify the connection
After clicking Allow, you'll be redirected back to your atoship dashboard's Channels page with a success message. Your Magento store should appear in the list with an "Active" status.
Alternative: Manual token entry
If you've already created an Integration and have the 4 API tokens (Consumer Key, Consumer Secret, Access Token, Access Token Secret), you can enter them directly:
- Go to atoship → Channels → Add Channel → Magento
- Switch to the Manual Tokens tab
- Enter your store URL and all 4 tokens
- Click Connect
This is useful if your Magento store can't reach the internet (e.g., staging environments behind a firewall) or if you prefer to manage tokens manually.
What gets synced
Magento → atoship
- Order number, date, total
- Billing & shipping addresses
- Line items with SKU, quantity, weight
- Customer name & email
- Order status & payment info
atoship → Magento
- Tracking number & carrier
- Shipment creation on the order
- Order status update (→ Complete)
- Tracking URL for customers
Disconnecting
You can disconnect from either side:
- From atoship: Go to Channels, find your Magento store, and click Disconnect.
- From Magento: Go to System → Integrations, find "AtoShip", and click Delete or Reset.
Disconnecting does not delete any orders or shipments already synced. It only stops future sync.
Troubleshooting
"State not found or expired" error
The OAuth handshake must complete within 10 minutes. If you took too long between Save and Activate, delete the Integration in Magento and create a new one.
Redirect goes to login page
You need to be logged into atoship in the same browser before clicking Activate in Magento. Log in to atoship first, then try Activate again (you may need to recreate the Integration).
Connection test fails
Make sure your Magento store's REST API is enabled and accessible from the internet. Check that the Integration has the required API permissions (Sales, Catalog, Stores).
Orders not importing
Verify the store shows as "Active" on your Channels page. Order sync runs on a schedule — newly placed orders may take a few minutes to appear. You can also trigger a manual sync from the Channels page.
Requirements
- Magento 2.3+ (Open Source or Commerce)
- REST API enabled (default)
- HTTPS required
- Admin access to create Integrations
Callback URL
https://atoship.com/api/channels/magento/callbackIdentity Link URL
https://atoship.com/api/channels/magento/identity