I am having issues with the sandbox endpoints. I created a dotenv file that stores my tokens. However, when I try to create a customer in a js file it will state “AUTHENTICATION_ERROR, UNAUTHORIZED, This request could not be authorized.” Even though I renew my tokens from time to time and tested them in API explorer where it still works. It just won’t seem to authorize on my local workspace.
What’s the application ID you’re getting this error with? The one I found the API Logs are showing that all the calls to CreateCustomer are successful. It the call to CreateBooking thats failing with UNAUTHORIZED cause the seller hasn’t yet signed up for Appointments.
The application ID is sandbox-sq0idb-bgRR4d1jzG_fqcJNZbRivg.
One of the createCustomer was made on the Sandbox Connect Website.
I also haven’t tried the bookingAPI on my local workspace. I only used it on the API explorer.
Okay, I only see logs for request from the API Explorer. Is the client that the credentials are configured set to target the sandbox environment? An UNAUTHORIZED error only happens when credentials or environment aren’t configured correctly.