Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
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+'"';