Todd Epple
01/06/2025, 2:57 AMCeligo AI
01/06/2025, 2:58 AMAI generated answer (using internal Slack threads):Based on the conversations, the
INVALID_DOMAIN
error you're encountering with your <http://https.post|https.post>
request in SuiteScript could be due to a couple of reasons:
1. API Secrets Restrictions: In NetSuite, each API secret can be restricted for use for only certain outgoing domains. If you're trying to use a secret that is not authorized for that domain, you might get the "invalid domain" error message. The domain must match exactly. For example, <http://atradius.com|atradius.com>
does not match <http://api-uat.atradius.com|api-uat.atradius.com>
. You can check this in NetSuite under Setup > Company > API Secrets.
2. Incorrect Encoding: There was a case where the encoding script from SuiteAnswer was not producing the correct base 64. The user resolved the issue by using the following code snippet:
javascript
// Create BASE-64 encoded name:password pair
let base64 = encode.convert({
string: `${nameToken}:${passwordToken}`,
inputEncoding: encode.Encoding.UTF_8,
outputEncoding: encode.Encoding.BASE_64
});
3. URL Format: Ensure that the URL is a fully qualified HTTP URL. If you're using a variable for the URL, you might want to log it just before the https send to ensure it contains what you expect.
******
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/06/2025, 2:58 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819708586
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.800120652
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.798053861
Celigo AI
01/06/2025, 2:58 AM