Get Free Audit

API Calls Don’t Work After Updating Magento to 2.2.5 Version

Jul 25, 2018

5135 Alex Simonchik

API Calls Don’t Work After Updating Magento to 2.2.5 Version

We have recently updated the Magento platform from version 2.2.3 to 2.2.5 to one of our clients and faced a painstaking issue: every API call return us an error message: Consumer is not authorized to access %resources.

The full stack trace of error is:


We looked for the solution to this issue on GitHub, but couldn’t find it there, so we began the debugging process. What caused this issue was the method \Magento\Webapi\Model\Authorization\TokenUserContext::isTokenExpired.

migration to magento 2

Migration to Magento 2

Take your online store to the next level with BelVG Magento migration

Visit the page

As soon as we found the cause of the issue we checked this file on a 2.2-develop branch on GitHub and found a patch. After that we found an issue on GitHub:

Igor Dragun
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Igor


Since this issue is relevant to the currently available version of Magento (the current version now is 2.2.5), I hope you will find this article helpful.

Magento Development

Take your online store to the next level with BelVG Magento development

Visit the page

Looking for a reliable partner to migrate your Magento store to the newest version? Turn to BelVG!

Igor Dragun
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Igor

2 Comments

  1. Hi, Rajesh. Thanks for your question.
    The decision is stated in the article
    – You can create your own module that will override the method and add new lines
    – You can make a composer patch from the git link we gave in the article

  2. Yes, I get This Error with Shiprocket, But What is the Solution For This Error ? Please Help

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *