Quick security check

Verifying…

Protected by Cloudflare. This keeps bots from creating fake accounts.

We Ship YouAnythingAnywhere
  • Shop
  • Mobile APP
  • Docs
  • Pricing
  • About Us
  • Shop
    • WeShipYou

      Shop curated products from WeShipYou sellers, fulfilled end-to-end with our shipping guarantee.

    • Amazon

      Shop on Amazon, the world's largest store with the widest range of products, all with the security of WeShipYou!

    • eBay

      New and used items from US sellers: we buy Buy It Now listings for you.

    • AliExpress

      Millions of products at factory prices, bought and shipped by us.

    • Walmart

      Shop pharmacy and grocery products at Walmart quickly and easily!

    • Shein

      Shop the latest trending products at the best discounted prices, only at the Shein store!

    • Temu

      Shop the best products at discounted prices at the Temu store!

    • Shopify

      Search thousands of US Shopify stores at once, or paste a link from any of them.

  • Download Mobile APP
    • FulfillmentNew

      Receiving, storage, same-day pick & pack, multi-carrier shipping and returns — handled by us.

    • Price comparator

      Compare and select the shipping service based on your interest fast and easy

    • Shop integrations

      Shopify app, public API and more — plug WeShipYou into your store.

    • API

      API Access for developers

    • Invoicing

      Automatic monthly invoices, branded PDFs and one-click payments.

  • Docs
  • Pricing
  • About us
  • Recharges to Mexico
  • Recharges to Colombia

Join our newsletter!

No spam, guaranteed.

Miami, FL — United States Warehouse

1940 NW 70th Ave, Miami, FL 33126

Get Directions
Follow us
GroupChannel
RechargesRecharge to MexicoRecharge to ColombiaRecharge to JamaicaRecharge to Nicaragua
ShippingSend a packageFulfillment serviceShop integrationsInvoicingShip to ColombiaShip to BrazilShip to MexicoLocker for Colombia
ResourcesDownload APPApiCommercial Assistance
CompanyAbout
Careers
Hiring
Become an AffiliateSupportContact us
Shop
WeShipYou
Amazon
eBay
AliExpress
Walmart
Shein
Temu
Shopify

WeShipYou is proud to be PCI-compliant certified, ensuring the highest standards of payment security and data protection

© We Ship You Corp. Terms of service · Privacy Policy · Legal

The WeShipYou logo and the name "WeShipYou" are registered trademarks of We Ship You Corp

Theme
WeShipYou
  • Overview
Guides
  • Quickstart
  • Authentication
  • Test mode and live mode
  • Shipments and labels
  • Tracking
  • Sub-accounts
  • Errors
Authentication process
  • Authentication
General
  • Shipments
  • Tracking
  • Services
Forwarder
  • Forwarder
Mobile Recharges
  • Mobile Recharges
Account
  • Accounts
  • Account Addresses
  • Transactions
  • Add Funds
  • Add Sub Account
Download the OpenAPI spec
Menu
  • Overview
Guides
  • Quickstart
  • Authentication
  • Test mode and live mode
  • Shipments and labels
  • Tracking
  • Sub-accounts
  • Errors
Authentication process
  • Authentication
General
  • Shipments
  • Tracking
  • Services
Forwarder
  • Forwarder
Mobile Recharges
  • Mobile Recharges
Account
  • Accounts
  • Account Addresses
  • Transactions
  • Add Funds
  • Add Sub Account
Download the OpenAPI spec
Guides

Authentication

Log in for a JSON Web Token, send it on every request, and keep it out of reach.

The API authenticates every request with a JSON Web Token (JWT). There are no API keys: you log in with the same username and password you use on the website, and get a token back.

Get a token#

POST/authentication
Get an access token

Send your username (or email) and password. The answer carries the accessToken, its expiry exp (a Unix timestamp) and your user.

JSON
1
2
3
4
{
  "username": "janedoe",
  "password": "your-password"
}

Two-factor authentication#

If two-factor authentication is on for your user, the login also needs the current 6-digit code from your authenticator app, in twoFactorToken:

JSON
1
2
3
4
5
{
  "username": "janedoe",
  "password": "your-password",
  "twoFactorToken": "123456"
}

Without the code the login answers 401 with data.twoFactorRequired: true; a wrong code answers 401 Invalid two-factor code. Codes change every 30 seconds, so an integration that runs unattended has to log in while someone can type the code, or use a user without two-factor authentication that is limited to what the integration needs.

Send the token#

Put the token in the Authorization header of every other request:

cURL
1
2
curl https://sandbox.weshipyou.com/api/v1/accounts \
  -H "Authorization: Bearer $WSY_ACCESS_TOKEN"
  • No token, or an expired or malformed one: 401 NotAuthenticated.
  • A token for a user who is not a member of the account: 403 Forbidden or 404 NotFound.

When the token expires (at exp), log in again. There is no refresh token.

Keep tokens secret

A token acts as your user until it expires. Keep it on your server or in a secret store, never in code that runs in a browser or ships in an app, and never in a URL. If a token leaks, contact support: we can revoke every token of your user.

Test and live tokens#

The sandbox and live servers have separate users and separate tokens. A token from one is refused by the other. See Test mode and live mode.

PreviousQuickstartNextTest mode and live mode