Why does the image link from NetSuite work in the ...
# ask-stanley-ai
n
Why does the image link from NetSuite work in the browser but return a 400 error when accessed via curl or an API integration?
c
AI generated answer (using internal Slack threads):
The issue you're experiencing, where an image link from NetSuite works in the browser but returns a 400 error when accessed via curl or an API integration, is likely due to the way NetSuite handles URLs for resources in the file cabinet. When you access the image in the browser, you're likely already authenticated into NetSuite, so the image is accessible. However, when you try to access the image via curl or an API, you're not authenticated, hence the 400 error. In the case of the Suitelet mentioned in the conversation, the error was caused by the ampersands in the image URL. The standard preprocessing that occurs in NetSuite templates allows you to substitute "&:" for "&", but this doesn't work with the render API used in the Suitelet. This is a known bug in NetSuite. As a workaround, you could host the image outside of NetSuite, as was done in the conversation with the new logo hosted on the new Shopify website. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831534505
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816160798
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815986037
Please provide your feedback on this answer.