Why am I getting a 403 error status when calling the Shopify API?

Hello,

When I try to make a call to the Shopify API from my Custom app I get an error:

HttpRequestError: Failed to make Shopify HTTP request: FetchError: invalid json response body at https://voxelfactory.myshopify.com/admin/api/2022-01/script_tags.json reason: Unexpected end of JSON input

I wasn’t getting this error before, when I got this error, I uninstall and reinstall, but get the same error. I also tried making the request with Postman, but I got an 403 status, wich probably mean my access token is wrong. But, in my .env variables, scopes are set to read_script_tags,write_script_tags and to be sure, I printed them from the after auth function.

The output is write_script_tags.

Here are my configurations:

And the post request I am making with Shopify rest client:

In case you need an X-Request-ID from my response’s headers, here’s one: a9cdfb4b-21df-4e4e-b23c-add316344586

Specifications:

Is there any way to fix this ?

Thanks !

Finally, after long hours of testings, I’ve found the problem.

When I use my account to connect to the app, It’s giving me an access token with no access. But when the admin of the shop connect with his account, he got the right access token.

Is there any way to fix that, is that because it’s a custom app ?