Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Unable to connect to NetSuite from Salesforce
Hello team,
I am unable to generate valid signature from sales force using OAuth 1.0.
I followed all instructions as mentioned in NetSuite. My Signature algorithm is HMAC-SHA256.
Please help.
below lines of code in Salesforce..
Blob sig = Crypto.generateMac('hmacSHA256', Blob.valueOf(baseString), Blob.valueOf(signingkey));
String signature = EncodingUtil.urlEncode(EncodingUtil.base64encode(sig), 'UTF-8');
system.debug('sig'+ sig);
System.debug('Signature: '+signature);
Http http = new Http();
HttpRequest request = new HttpRequest();
String AuthString = 'OAuth realm="xxxxx",oauth_consumer_key="xxxxxxxxxxx475a19359ab93bf7f4f9397ee0f88de66c8408e7f",oauth_token="b8410d1e3f16268240a7627f26b60b54c8e089109xxxxxxxxxx",oauth_signature_method="HMAC-SHA256",oauth_timestamp="'+tnow+'",oauth_nonce="'+nonce+'",oauth_version="1.0",oauth_signature="'+signature+'"';