"err": {
"name": "TypeError",
"message": "Cannot read properties of undefined (reading 'api_key')",
"stack": "TypeError: Cannot read properties of undefined (reading 'api_key')\n at Object.run (file:///tmp/__pdg__/dist/code/aff23efbe30bdcdcda41b2abe507c93f0e20aa908365d5e347ce6517299144e8/code/actions/get-weather-forecast-by-location/get-weather-forecast-by-location.mjs:59:45)\n at file:///var/task/component_maker.mjs:165:42\n at captureObservations (/var/task/node_modules/@lambda-v2/component-runtime/src/captureObservations.js:28:11)\n at run (file:///var/task/component_maker.mjs:155:26)\n at async MessagePort.anonymous (file:///var/task/component_maker.mjs:193:9)"
}
The authProvisionId points to the configured account (OpenWeatherAPI) that works fine in a workflow.
Thanks . I looked at the demo app and the payloads look the same. I think the issue is the fact that its unable to find the account.
The account exists, but when I call the /accounts API (connect and non-connect APIs), nothing is returned. I created the account via the UI. I do not understand how to associate it to a specific project.
Is their a headless option? Can I generate Connect tokens iin an automated, headless fashion? I’d like to stick with REST calls and the standard OAuth flow, but it does not appear to be available (or documented). Thanks!
Yea it’s not something that Connect is well-suited for today. The Connect API right now relies on the end user providing the credentials and Pipedream storing them on our end.
Many of the integration we have use service accounts rather than user credentials. Using OpenWeather as an example, ideally we’d have API access to create the account. We will collect the credentials from the administrator and pass them to you when configuring the account. Credentials typically take the for of tokens or the OAuth client credentials grant flow.
Once the account is registered, we’d like the ability run/execute actions associated with the account - e.g. get the weather forecast for a specific location. We’d have a token with sufficient scope/permissions to invoke operations on the account on behalf of the customer.
Essentially we’d like a “headless” option where we configure the account programmatically and then invoke it at some later date.
There are use-cases where the end user will also need to provide credentials.
We’d like to try and use 1 product for both solutions.