I'm getting "Not Found" error pages in response to...
# suitetalkapi
k
I'm getting "Not Found" error pages in response to every request in the collection even after filling in all the variables... FIX: Make sure of the following: • User token is on the correct integration or the credentials will not match • Import the environment from the sample zip file, don't try to create the environment from scratch. DO NOT edit
{{REST_SERVICES}}
• Company URL is the one in Setup > Company Information > Company URLs > SuiteTalk • Account ID is the one in Setup > Company Information in the header section, NOT the company ID as it appears in the URL.
b
what does your environmental variables look like
k
I set them up as per the instructions, one moment gotta run to a meeting
Ok for example using the provided URL in the tutorial:
{{REST_SERVICES}}/record/v1/customer/
I get 404 Not Found
Using the URL from the REST records browser:
{{REST_SERVICES}}/services/rest/record/v1/customer/
I get 401 Unauthorized
same credentials, using token and consumer key and secret
The user role has REST Web Services set to 'full'
and TBA of course otherwise I wouldn't have an integration token
b
still need to see the environment
what you shared so far suggests that {{REST_SERVICES}} is not setup correctly
k
it's the URL listed under Setup > Company > Company URLs > SUITETALK (SOAP AND REST WEB SERVICES)
b
thats wrong
k
Oh ok
b
the company url goes in the COMPANY_URL
k
What should I be using, then?
b
put the REST_SERVICES variable back to its original value
k
<https://companyID-sb1.suitetalk.api.netsuite.com>
The original value was undefined
b
start over
delete the collection, reimport it
k
ok
Ok I've got the freshly imported tutorial collection, no variables are populated
b
fill in the 4 tokens
do not change the REST_SERVICES variable
k
Nothing there is named "company url"
Do you mean NetSuite UI or Suitetalk?
b
SuiteTalk (SOAP and REST web services)
would be the label of the field you are looking for
k
realm is customerID-sb1 right?
b
you shouldnt be filling in the realm
and no
k
oh ok it had it as {{ACCOUNT_ID}}
b
do not make the mistake of assuming that the account id is the same as the id in the url
k
Ok under collection
0 Test
passes, but
1 Metadata
gets 404 Not Found for all tests
b
delete and reimport the collection
k
Again? Ok
b
the collection, not the environment
k
Ah ha!
That's the missing step
I'd not imported the environment before
I was just setting variables as I found them
Setting up the environment now...
Ugh, now I get unauthorized on the test
@battk you were right, by the way, when I change
{{REST_SERVICES}}
to the company URL I get the same behavior I was getting before we started talking. Leaving it as it was gets unauthorized no matter what I do. 😕
b
k
Yup, I fixed it
It was the user
Dunno what's different yet, but I changed from the integration user to my own user and it worked flawlessly
same role, same integration
Nope, not the same integration. It was a mismatch between integration and user credentials. I had created the user token for the wrong integration.