Search code examples
plaid

Getting access_token for plaid for sandbox environment running


I am trying to get a sample public_token or access_token for plaid in sandbox mode. I need the access_token for api's like auth and institutions. I ran the demo here, by choosing a bank and entering the credentials as user_good and pass_good. When I inspected the page I did get a public_token in response. But I am unable to exchange this for an access_token, with the client_id and secret I got from singing up in the dashboard. I keep getting the error INVALID_TOKEN. How do I get the access_token ?


Solution

  • The public_token you get by inspecting the page of the demo app, is for the client_id and secret of that demo app. It wont work with your client_id and secret.

    You need to run the demo app locally, with your client_id and secret. Look at this - https://github.com/plaid/quickstart/tree/master/node

    Follow the readme file to run the demo locally, but with your client_id and secret and then inspect the page like you did above. The public_token you get this time will work with your client_id and secret :)