Ecommerce Shopify WordPress Discussion

nodejs shopify api 404 not found but all other api requests works

I use shopify node api and make some api calls. All works, I use access scopes and get some products and it works fine. But when I want to get the collections I get this: 404 Bad request AxiosError: Request failed with status code 404 at settle (C:\express_inngest\node_modules\axios\lib\core\settle.js:19:12) at BrotliDecompress.handleStreamEnd (C:\express_inngest\node_modules\axios\lib\adapters\http.js:572:11) at BrotliDecompress.emit (node:events:402:35) at BrotliDecompress.emit (node:domain:475:12) at endReadableNT (node:internal/streams/readable:1343:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: 'http', transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: null }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, */*', 'Content-Type': undefined, 'X-Shopify-Access-Token': 'shpat_xxxxxxxxxx32221xx', 'User-Agent': 'axios/1.5.0', 'Accept-Encoding': 'gzip, compress, deflate, br' }, My Question is now why other apis works and this not ? I copied the URL from the docs so there is no typo. Here is my ohter code: export const buildGetCollectionUrl = (shop: any) => `https://${shop}/admin/api/2023-04/collection_listings.json`; export const fetchCollection = async (shop: any, accessToken: any) => await axios(buildGetCollectionUrl(shop), { method: 'GET', headers: { 'X-Shopify-Access-Token': accessToken } }); const shopify = shopifyApi({ apiKey: 'xxxx', apiSecretKey: 'xxxx', scopes: ['read_products', 'write_products', 'read_orders', 'write_orders', 'read_product_listings', 'write_product_listings', 'unauthenticated_read_product_listings'], hostName: '', apiVersion: LATEST_API_VERSION, isEmbeddedApp: true }); app.get('/auth/callback', async (req: any, res: any) => { try { // The library will automatically redirect the user const callback = await shopify.auth.callback({ rawRequest: req, rawResponse: res, }); const response = await shopify.webhooks.register({ session: callback.session, }); const { data: collections } = await fetchCollection(, callback.session.accessToken); console.log(collections); return res.send('x'); .... It goes to the auth0 process and all works I also get the access token so in other api urls it works but not this for collection. Can anyone explain me why it is not working when I want to get the collections ?
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.