5

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

1 Answer 1

1

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);
4
  • req.getParameters().putAll is not supporting here
    – Tepsi
    Commented Dec 2, 2013 at 9:08
  • @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.
    – Tepsi
    Commented 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"
    – Sunny
    Commented Dec 28, 2013 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .