This topic was automatically generated from Slack. You can find the original thread here.
Hi, I get CORS errors when using the Get deployed trigger endpoint, but not with any other endpoints (for the same token). Anyone know why this might be? I’m using the Typescript browser SDK.
To make sure I’m using the correct token I’ve even tried making the call immediately after deploying a trigger, and I get the same issue.
Yeah, I could ask our backend team to add an endpoint to proxy this call through the server, but it leads to a disjointed experience (with a subset of calls being proxied).
This feels like a bug with the Connect API? I raised in here because I’m not sure if there’s something we should be doing differently during the token generation process to avoid this, or to ask if this endpoint is intentionally unavailable from a browser.
The problem is a fundamental browser security feature called the Cross-Origin Resource Sharing (CORS) policy. It prevents a script on your website from making requests to a different domain (like Pipedream’s API) unless that domain explicitly allows it.
Given this context, I would recommend you to move all Pipedream Connect API calls to your backend server.
Yea in theory you should be able to make the call from the browser, if that’s the only endpoint that’s giving you a CORS error I do agree it sounds like a bug, will check it out.