Magento – Magento’s REST API responses claiming oauth_callback param is empty

apimagento-1.9oauthrest api

Working with Magento CE 1.9.

I'm attempting to make use of Magento's API however I keep running into the same error in my response: oauth_problem=parameter_absent&oauth_parameters_absent=oauth_callback

I've referenced Magento's documentation and in order to get this "unauthorized request token", they claim the oauth_callback param "should be present in the Authorization header".

http://devdocs.magento.com/guides/m1x/api/rest/authentication/oauth_authentication.html#OAuthAuthentication-GettinganUnauthorizedRequestToken

I've used multiple REST clients (especially Postman) and random HTTP Request generators that feature OAuth authentication and none of them seem to posess the means to include the oauth_callback param in the Authorization header. I've also attempted to manually include the oauth_callback param into my Authorization header but then it breaks the signature or has other, similar errors.

I've tried POST (what is recommended by Magento's doc), GET (what I've actually seen others using for this step – believe it or not) and I've attempted to tuck the oauth_callback into header, body and parameters without success.

So then, where should the oauth_callback be included if adhering to Magento's documentation for REST API usage?

Best Answer

I ran into this same problem yesterday, and it was hard enough to figure out that I wrote an entire blog post to answer your question with code samples and everything needed to get through the auth steps. Hope it at least helps.

How to get an auth token from Magento REST API 1.x

Related Topic