Search code examples
androidmagentooauthretrofitsignpost

OAuth 1.0 Requests with Retrofit in Android


I am trying to access a Magento REST API in my Android app, using Retrofit.

What have I tried:

But none of them have worked.

Retrofit 1.7 and OkHttp2.0RC2 don't work well with SignPost (at least the way the article suggest)

And when I downgrade for things to work, I get error HTTP 500 Error saying Internal Server Error

The same credentials work using REST Client plugin for Firefox.

Is there a working solution for implementing OAuth requests with Retrofit, or any other option?

Much thanks in advance.


Solution

  • Turned out that the web server expected the Accept parameter in header, which I was missing but Firefox extension was adding.

    That made the server return a 500 (sending a response telling about the error would have been wiser though)

    Things are working fine now.

    Thanks for giving your time!