-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[Components] plaid #15144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @sergio-eliot-rodriguez is not very clear to me if we need to create the accessToken from components or from the app registration window because seems like all endpoints require this accessToken in order to be called. I tried to undestand the flow by calling https://plaid.com/docs/api/sandbox/#sandboxpublic_tokencreate in order to get access to the public_key so then I can make a request to https://plaid.com/docs/api/items/#itempublic_tokenexchange to get the accesToken but I was facing API errors like:
Which I didn't kown what that means and I couldn't fix it. This is the step I was using to try to get the access token just in case you want to try it for yourself. import { axios } from "@pipedream/platform";
export default defineComponent({
props: {
plaid: {
type: "app",
app: "plaid",
}
},
methods: {
getUrl(path) {
const { environment: baseUrl } = this.plaid.$auth;
return `${baseUrl}${path}`;
},
getHeaders(headers) {
const {
client_id: clientId,
client_secret: clientSecret,
} = this.plaid.$auth;
return {
...headers,
"PLAID-CLIENT-ID": clientId,
"PLAID-SECRET": clientSecret,
"Content-Type": "application/json",
};
},
makeRequest({
$ = this, path, headers, ...args
} = {}) {
return axios($, {
debug: true,
url: this.getUrl(path),
headers: this.getHeaders(headers),
...args,
});
},
post(args = {}) {
return this.makeRequest({
method: "POST",
...args,
});
},
sandboxCreatePublicToken(args = {}) {
return this.post({
path: "/sandbox/public_token/create",
...args
});
}
},
async run({steps, $}) {
const { sandboxCreatePublicToken } = this;
return sandboxCreatePublicToken({
$,
data: {
institution_id: "ins_130347",
initial_products: [
"assets",
"auth",
"identity",
"identity_match",
"income_verification",
"investments",
"liabilities",
"signal",
"transactions"
]
}
});
},
}) So at this point I'm kind of stuck on this because the endpoints are not working at all and it is because I don't have the accessToken. So it would be helpful if you try to reach out dev support on this and see if they can help us out. Thanks in advance! |
@jcortes would it be possible to try the plaid sdk instead of plain http calls?
Do you see using the SDK as an alternative? |
Hi @sergio-eliot-rodriguez yeah I forgot to mention I already tried the SDK but unfortunately it didn't work either. It even seems like it's a bit behind the REST API not sure but it definitely didn't work! |
Currently a workflow to get the an access token via a public token as provided to Jorge for him to continue, while I work on setting up this in this as the auth strategy in the API connector/base integration. |
I checked, and I found out that it would be complicated to have a setup of only one application in the authentication strategy, because the sandbox itself has different flows depending n the use case (eg. Item Creation vs Income vs Plaid Check Consumer Reports), plus production/development environment require a setup that takes as input a link code obtained via link https://plaid.com/docs/link/ Reaching out to Product check if actually we'd want to update the app, i think we should stick to the SDK. |
Ok I had second thoughts and decided not to approach Product for now, maybe until there is a user actually flagging this. we would be blocked to change the auth strategy for production for this needs a widget embeded to get a public token (need in turn to get an access token). i could prepare a multie step flow to get access token for sandbox (that doesn't require the widget) but then it would work for sandbox but not for production. production endpoints require to use link, which documentedly is:
Plaid base integration uses the SDK, which itself depends on the public token returned from Plaid Link you can verify this from
Unfortunately this implies as of writting the base integration is broken for production use cases because it expects the public token from Plaid Link which we don't even ask it in the custom fields, is a client side, graphical componentat that we can't use in the submit an app u to incorporate it in the authentication flow strategy. That said, we shouldn't ask for public tokens because theiy are short-lived, with 30 minutes lifetime.
|
Hello everyone, I have tested this PR and there're some test cases failed or needed improvement. Please check the test report below for more information |
Create Sandbox Public Token - FailedAll props - FailedSeems like an API bug because the only user/password that kind of worked for me are the ones that come with the environment which are I addressed the rest of issues you mentioned in the document, so please try again with latest push, thanks! |
Hi everyone, all test cases are passed! Ready for release! Test report |
plaid
URLs
Webhook Sources
new-accounts-available-instant
Prompt
Emit new event when there are new accounts available at the Financial Institution.
new-event-instant
Prompt
Emit new event when there are changes to Plaid Items or the status of asynchronous processes.
sync-updates-available-instant
Prompt
Emit new event when there are new updates available for a connected account.
Actions
create-access-token
Prompt
Exchange a Link
public_token
for an APIaccess_token
.create-sandbox-public-token
Prompt
Creates a valid
public_token
for an arbitrary institution ID, initial products, and test credentials.get-real-time-balance
Prompt
Get the real-time balance for each of an Item's accounts.
get-transactions
Prompt
Retrieves user-authorized transaction data for a specified date range.
The text was updated successfully, but these errors were encountered: