cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Connecting Shopify to CAPM Issue

ManojKumarVarma
Explorer
0 Kudos
284

Hello All,


I’m currently working on a CAPM (Cloud Application Programming Model) project, where I’m trying to integrate Shopify using its API endpoints. The goal is to retrieve data by passing query parameters while using authentication credentials such as:

  • X-Shopify-Access-Token
  • Content-Type: application/json

Everything seems straightforward, but when I attempt to make a request, I keep running into this error:
read tcp 100.96.8.158:41620->23.227.38.74:443: read: connection reset by peer\

  • Checked API Credentials – The X-Shopify-Access-Token is valid, and the headers are correctly set.
  • Verified API Endpoint – The Shopify API URL and query parameters seem correct.
  • Tested with Postman – Surprisingly, the request works fine in Postman, but fails within CAPM.
  • Network & Firewall Debugging
    • No restrictions from my end.
    • The Shopify endpoint is reachable via browser and Postman.
    • No VPN or proxy causing issues.
  • Tried Different HTTP Libraries
    • Used both axios and node-fetch, but got the same error.
    • The issue persists in both @SAP-cloud-sdk/http-client and direct http.request().
  • Looked at Shopify Rate Limits
    • Shopify enforces rate limits, but I’m well under the threshold.
    • Even after waiting, the request fails again.

      Here I'm sharing the screenshots of it and code which I'm using Can anyone help on this?

Sample Code:

ManojKumarVarma_0-1740125586603.pngManojKumarVarma_1-1740125605374.png



Issue:

ManojKumarVarma_0-1740125015903.png

Thanks,
Manoj Kumar.

 





 

Accepted Solutions (0)

Answers (2)

Answers (2)

rotem_puterman-sobe
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Manoj,
Are you trying to preview your CAP application from SAP Business Application Studio dev space? If you do, I suggest also testing the same request directly from the dev space Terminal (using curl command for example), or from the dev space REST client (using .http file).

Thanks,

Rotem

Virinchy
Active Contributor
0 Kudos

Hi Manoj, Can you please try to create a connection hook point via package.json and use the end points in the service implementation?  

"cds": {
    "requires": {
      "weatherservice": {
        "kind": "rest",
        "credentials": {
          "url": "https://api.openweathermap.org",
          "requestTimeout": 30000
        }
      }
    }
  }

you may find the sample code to consume rest API in CAP here