quickstart icon indicating copy to clipboard operation
quickstart copied to clipboard

How to re-use ACCESS_TOKEN/ ITEM_ID

Open tnguyen14 opened this issue 4 years ago • 3 comments

Once I've retrieved a set of ACCESS_TOKEN/ITEM_ID, how can I reuse it?

I tried setting them as environment variables for the node process, and modified the code here https://github.com/plaid/quickstart/blob/master/node/index.js#L42-L44 to use them:

let ACCESS_TOKEN = process.env.ACCESS_TOKEN;
let PUBLIC_TOKEN = null;
let ITEM_ID = process.env.ITEM_ID;

However, the frontend code still doesn't know to render the created link, even though /api/info call returns the item_id and access_token correctly.

tnguyen14 avatar Jun 12 '21 18:06 tnguyen14

@tnguyen14 The purpose of entering the Link flow is to obtain (or update) an access token. If you already have a working access token -- for example, if you obtained one from a previous run of the Quickstart or via running API calls outside the Quickstat -- you don't need to use the Link flow. (I'm not entirely clear on what you're trying to do, so let me know if that doesn't solve your problem.)

phoenixy1 avatar Jun 14 '21 20:06 phoenixy1

@tnguyen14 I'm going to close this issue since I believe the comment answers it, but feel free to open a new one or re-open if your problem is not resolved.

phoenixy1 avatar Jun 16 '21 19:06 phoenixy1

Sorry I was in the middle of replying and lost internet, and I lost the comment.

My purpose is to use the frontend web app to test out the APIs, using an existing token. I don't want to be creating a new token every time, or having to create one if the server needs to restart.

Can this issue be reopened?

tnguyen14 avatar Jun 16 '21 19:06 tnguyen14

@tnguyen14 you can absolutely re-use the existing access token to do this. however, you'd probably want to update the quickstart code to go directly to the page that shows the various buttons, or just create your own custom app.

I think you might also want to check out the Postman collection, which is designed to do exactly what you're trying to do in a much easier UI that is more tailored for your use case: https://github.com/plaid/plaid-postman

phoenixy1 avatar Aug 17 '22 19:08 phoenixy1