When processing an order, you might run into the [Operation returned an invalid status code 'InternalServerError' {"status":"error","error_code":"errors.bad_token","error_message":"Bad token error."}] error.

This error is related but not limited to: 

  • Incorrect API Key information on Carrier setup (invalid information or due to copy/paste error)
  • API Key provided by Essential Hub has expired

Feel free to follow the step-by-step guide written below or the video guide, as you prefer:

To solve this issue you will have to:

1. Access Carriers under the Maintenance menu

2. Click on the EHUB Carrier account associated to the order you're trying to process

3. Select the Accounts tab

4. Click Edit button on the Account

5. Select the Carrier tab

6. Update the API Key information in Carrier Options

7. Press Save to apply the changes

If the rest of the order information is correct, you will be able to Process or Process and Print.