I am using quickbook API
for integrating with salesforce
.I have created an app on developer account on intuit.
From there we got the consumer key
and consumer secret
. using both i am creating a signature using Hmac-Sha1
method.I got the error oauth_parameters_absent=oauth_signature
. Plz suggest
Add a comment
|
1 Answer
OAuth usually requires that the values be URL parameters, not HTTP headers. Try changing your code as follows:
String body = String.format(
'oauth_consumer_key={0}&oauth_signature_method={1}&oauth_signature={2}&oauth_timestamp={3}&oauth_nonce={4}&oauth_version={5}',
new String[] {
consumerkey, // the key
'HMAC-SHA1', // the method
signaure12, // the signature
s1, // the timestamp
nonce, // the nonce
'1.0'} // the version
);
req.setBody(body);
-
-
@Aisha You're right, I forgot myself. Try the new version.– sfdcfox ♦Commented Dec 2, 2013 at 9:14
-
thank you! i'm able to authenticate all API from Quickbook now.– TepsiCommented Dec 5, 2013 at 12:21
-
I am using above code but unable to get the result getting error as 401 Unauthorized "oauth_problem=signature_invalid"– SunnyCommented Dec 28, 2013 at 13:29