Nour Khaled
01/27/2025, 8:42 PMCeligo AI
01/27/2025, 8:42 PMAI generated answer (using internal Slack threads):In order to change the authorization to OAuth 1.0 instead of a bearer token in SuiteScript 2.0, you would need to modify the headers in your HTTP request. Instead of using the "Bearer" keyword followed by the token, you would use the "OAuth" keyword followed by the OAuth 1.0 credentials. Here is an example of how you might modify your code:
javascript
var reqInformaHeaders = {
"Content-Type": "application/json",
Authorization: "OAuth " + oauthCredentials,
};
var informaRes = <http://https.post|https.post>({
url: "<https://5729924-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=537&deploy=1>",
body: JSON.stringify(reqInformaBody),
headers: reqInformaHeaders,
});
In this example, oauthCredentials
would be a string containing your OAuth 1.0 credentials. Please note that the format of these credentials may vary depending on the specific requirements of the service you are interacting with.
******
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/27/2025, 8:42 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841765463
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841202497
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841094375
Celigo AI
01/27/2025, 8:42 PM