Operation returned an invalid status code 'InternalServerError' (...) Bad token error."} [Solution]

Modified on Thu, 31 Aug, 2023 at 12:57 PM

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.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article