Hey! Could you please elaborate? I am using the PD npm SDK. I get the token as per the documentation. Everything else works fine. The problem seems to occur when I call client.app.list from my frontend. I am not dealing with authentication directly. It is handled by the PD SDK. Why should I downgrade?
_const_ client: PipedreamClient = createFrontendClient({ externalUserId: userId, tokenCallback: async () _=>_ { _const_ result = await HttpService.getIntegrationToken(); if (!result) { throw new _Error_("No token found"); } return result; }, });
I mentioned that I implemented it correctly and it works on dev environment. It only fails to work on production. And it returns 404 for the API. It looks to me like a bug in the SDK. It does not tell me what is not found? I am just querying the list of apps
Your code is for backend. I said already that I am having issues on frontend. There is no “clientSecret” or other properties in browser api. That would make the app insecure.
What you have sent does not even compile because clientId, clientSecret and other fields are not available in frontend.
could you please chime in. Is @U03CXTHK4RF AI agent? They don’t understand me, and I’m not sure if I should continue talking to them. I’d rather not if they’re AI.
Most of your interactions with the Connect API will likely happen on the server, to protect API requests and user credentials. You’ll use the SDK in your frontend to let users connect accounts. Once connected, you’ll use the SDK on the server to retrieve account info, invoke workflows on their behalf, and more.
Then how should I paginate apps.list if it does not return cursor?
apps.list return Page and it has getNextPage function. How to call it via the REST API? It requires reference to the page. But in REST API there is no reference.
Either app.list should expose cursor so I can build my API around it or apps.list is meant to be called from frontend (which works fine in dev environment)
(btw there is a cursor returned in the api but it is not exposed in the TS types. I need to hack it using const res:any to make it’s type “any” ) so I can get cursor. This is a hacky way which I would prefer not to do on production app)
Hey sorry for the confusion — you can make requests directly from the browser with the TS SDK. Can you let me know what’s working and what isn’t working?