Forum Discussion

aosorio's avatar
aosorio
New Contributor
11 years ago

How do I send REST request with the oauth parameters ?

How do I send REST request with the oauth parameters added in the URI (as input parameters)?

I have a specificaiton for a project that accesses a third party service -RESTfully and requires oAuth authentication. [It accepts only GET method, and no access token is required since I will be trying to access the protected resources using consumer key and consumer secret values along with the oauth parameters.]

I am using SoapUI-Pro 4.6.1 and tried sending a GET request with oauth parameters as authorization header using signpost method, but my project accepts only when the oauth parameters are sent in the URL.

So, when I generate oauth signature, nonce and timestamp values manually using this link- http://oauth.googlecode.com/svn/code/javascript/example/signature.html and update it in my request URL, it is working fine.

Sample URL: http://sample.com/content/?oauth_consumer_key=abc&oauth_nonce=FUINSzmeoDh&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1384436218&oauth_version=1.0&oauth_signature=ISAsa2LJt3tVhgCnbL/GQszcZbc=

Instead of this manual step, is there a way to generate oauth_signature, oauth_timestamp & oauth_nonce values automatically and then use it in the request URI as an input parameter?

Alfredo Osorio
http://www.sempresariales.com