OAuth1
OAuth1 copied to clipboard
Creating correct oauth signature with Java
Hi all.
So i am trying to send a POST request to Wordpress using Java in a Processing sketch and am hitting a brick wall with the oauth signature. I have used all sorts of code to create the signature correctly but whatever i do i am getting the dreaded 'json_oauth1_signature_mismatch' error.
I have used Postman to generate the oauth signature and then used it within Processing to send the the POST request and it works fine so im assuming that whatever Java methods i am using to generate the signature with HMAC-SH1 are not producing the same signature that PHP does on the Wordpress side.
Any ideas from anyone? Has anyone actually used Java to successfully make a POST request and if so do they have any working code?
Thanks in advance for any help.
Is there some way i can establish the base string that the application creates to produce it's signature? Having a look through the code it looks like the signature might be incorrect because of the way the parameters are normalised on the server side. I have checked the hashing on the client side and server side and provided the base string and signature key are the same then both produce the same results. It must be doing something weird server side.