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.
~Rob