Nour Khaled
01/30/2025, 8:55 AMCeligo AI
01/30/2025, 8:55 AMAI generated answer (using internal Slack threads):Based on the conversations, to add the authorization headers in SuiteScript 2.0 for a RESTlet called from an external client, you can use OAuth or the NetSuite-specific method NLAuth in the HTTP Authorization header. For OAuth, you will need to use token-based authentication (TBA) to access resources on behalf of a user. This eliminates the need to share login credentials such as username and password. You will need to provide the following parameters: consumer_key, consumer_secret, token_id, and token_secret. Here is an example of what the header might look like:
Authorization: OAuth realm="123456", oauth_consumer_key="your_consumer_key", oauth_token="your_token", oauth_nonce="your_nonce", oauth_timestamp="your_timestamp", oauth_signature_method="HMAC-SHA256", oauth_version="1.0", oauth_signature="your_signature"
Please note that the header is calculated for every request and cannot be hardcoded.
For NLAuth, you will need to provide the email and password of the user. However, please note that NetSuite RESTlets do not support Basic Authentication. They only support their custom NLAuth header and the TBA (Oauth1a) OAuth header.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
01/30/2025, 8:55 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.86670053
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863680959
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.860814512
Celigo AI
01/30/2025, 8:55 AM