-2

Can We call Restlet From External Suitelet with NLAuth or any auth.Kindly post some sample please.

ashbaq1
  • 45
  • 1
  • 8

1 Answers1

3

Here's the simplest way to do a GET to a RESTlet:

var headers = {};
headers["Authorization"] = 'NLAuth nlauth_account=TSTDRVXXXXX, nlauth_email=xxx@xxx.com, nlauth_signature=XXXXXXX, nlauth_role=3';
headers["contentType"] = 'application/json';

var url = 'https://rest.na1.netsuite.com/app/site/hosting/restlet.nl?script=xxxx&deploy=xxx';

var response = nlapiRequestURL(url, null, headers);
Adolfo Garza
  • 2,966
  • 12
  • 15