Calling Shopify Admin REST API

For some reason a very simple REST API call to Shopify Admin API is not working. It is a simple GET method call with the complete URL to fetch list of products, the URL works directly on Chrome, it works fine with Xano but for some reason it is working with Backendless.

This is the platform I want to use as there are multiple things which this platform provides but I’m stuck at the very first step itself. Please help.

Thanks in advance!

Can you describe *not working" in more details?
Do you make a call from cloud code or UI builder?
Have you verified that a call is made?
Are you having problem processing the response?
Are you logging any errors?

I’m using Codeless “GET” method and sending the URL in “Path”. I’m not using UI builder, just creating API endpoints for now. I don’t think processing is an issue here, I’m not sure about the “whether the call is made” - but I guess it is getting called.
Upon invoking, I’m getting the below error response:

{
“code”: 0,
“message”: “{“errors”:”[API] Invalid API key or access token (unrecognized login or wrong password)"}",
“errorData”: {}
}

Also, the same configuration and URL works fine with Chrome Tabs and Xano backend.

Can you share a screenshot of your codeless logic?

Does the error you get come directly from Shopify? If not, are you logging the response you get from Shopify?

Yes it is coming from Shopify I guess - I cannot be sure though but I’ve seen similar error on chrome and Xano while trying to ping their graphql endpoints.
But this one is RESt endpoint.

The codeless logic is shown below

The error is telling you that the request has invalid API key or access token. What are you going to do about that?

Yeah but that is not the case because the same URL works fine with Chrome as well as Xano - so authentication is fine I guess, the trouble I guess is Shopify returning an invalid error or it is to do with the UTF8 encoding wherein shopify is unable to read the URL as intented - I’m not sure though.

What is the url for the API documentation on the Shopify side?

Also, what is your application id in backendless?

The Shopify REST API url is:

The app id is: E5C3C4E7-A0D8-D47F-FF50-40E774EE2E00

I would like to see the link for the specific Shopify API you’re using. The main API documentation link you provided is not helpful at all, unfortunately.

This is the Product link: Product
And this is the main authentication URL link: Basic HTTP authentication

And I’m using this URL: https://{username}:{password}@{shop}.myshopify.com/admin/api/2021-07/{resource}.json

There are a few things you could try:

  1. Use the X-Shopify-Access-Token header with the password value:

or

  1. Use the Authorization header as described here:

Worked like a charm @mark-piller - This right here is the very reason I want to use Backendless as compared to any other BaaS solutions in the market, the community is so strong and supportive it is unparalleled. Thank you so much for this! :slight_smile:

Thank you. Glad you got it working!