OAuth with json in body and Autorization in parameters

Hi all,

I need to use an API provided by MailPlus (in dutch: https://kennis.mailplus.nl/wp-content/uploads/2014/11/REST_API_voor_MailPlus_Marcom.pdf)

They require an OAuth 1.0 authentication. I am not really familiar with OAuth so I dove into the Twitter example to get started.

However, MailPlus seems to be different from Twitter in the way it wants to receive OAuth parameters. The OAuth example using the Twitter API expects the request body to be in x-www-form-urlencoded. All data including the authentication parameters are encoded in key-value pairs and sent to the server.

MailPlus, on the other hand, wants parameters in the header and a application/json body. And that’s where I am stuck. 

I have successfully created a call to the API using Postman (a tool I use for testing API’s), but am not able to reproduce it in Lua.

Is there anyone who can get me on my way? Perhaps someone has already modified the oAuth.lua to be able to send application/json calls…

I appreciate your help.

Update: I have modified the oauth.lua so it puts a “raw” string in the body. The authentication parameters are still calculated and added to the header part of the request. Android does not accept this and comes with the error: No authentication challenges found. I cannot test this on my PC because crypto.hmac is not supported on the Windows simulator. :frowning:

~Rob

Do you have an oAuth 1.0 module you can post?  I am needing one as well

There’s one in the Twitter example of the SDK. That’s the one I used. Good luck!

I wish I could figure it out.  I’ve been trying to use it to access Yelp’s APInot having any luck.  Yelp provides consumer key, consumer secret, token, and token secret.  There is no additional user login required.  Just need to get signature to send requests.  

I’m also stuggling to understand how to use OAuth1 to get data from the Factual API. It’d be really helpful if a tutorial could be made on this.

I spent almost 2 days on Factual, could not get it to work. They use their own variations on oAuth which makes it incredibly difficult, for something that should be quite simple.

I might revisit it in the future as the service looks very useful.

Cheers.

Do you have an oAuth 1.0 module you can post?  I am needing one as well

There’s one in the Twitter example of the SDK. That’s the one I used. Good luck!

I wish I could figure it out.  I’ve been trying to use it to access Yelp’s APInot having any luck.  Yelp provides consumer key, consumer secret, token, and token secret.  There is no additional user login required.  Just need to get signature to send requests.  

I’m also stuggling to understand how to use OAuth1 to get data from the Factual API. It’d be really helpful if a tutorial could be made on this.

I spent almost 2 days on Factual, could not get it to work. They use their own variations on oAuth which makes it incredibly difficult, for something that should be quite simple.

I might revisit it in the future as the service looks very useful.

Cheers.