Hello, I am working in a sandbox environment, and...
# suitescript
s
Hello, I am working in a sandbox environment, and I created a RESTlet to connect to an external app, when I call the sandbox URL I get this error message code = "INVALID_DATA_CENTER"; *message = "Incorrect data center requested! The data center you are requesting is not the data center where your account is hosted. To obtain the correct URL for your request, please use the following endpoint: https://rest.netsuite.com/rest/datacenterurls?account=*ACCOUNT*. Then, send your original request to the correct data center.";*
b
usually thats getting the url wrong
s
I am using the URL given in the deployment
b
common cause is not knowing the difference between the account id and the id shown in the url
s
<https://#######-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=898&deploy=1>
I removed our account number
But it is the same in the sandbox and production
b
the accound id for production is not the same as the account id for the sandbox
assuming they are will get you errors like the one you are currently seeing
s
When I use the debugger, the url for sandbox is na0, while in prod the url is na3
And I don't use the account ID in the RESTlet call
only the url
b
you need the accound id for the realm
s
Thanks for your help. I was able to get it working I had to change the realm to the Sandbox Account ID as per your tip Then I had to create a new Integration and get the key/secret tokens And create a new Access token Working well now, thanks again for your help.... Have a great day!
There is no help on this issue anywhere on the internet
b
its an old error message, account ids are now used instead of data centers