Skip to content
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

PublicToken via LinkToken #62

Open
yogirajshakya opened this issue Mar 7, 2022 · 2 comments
Open

PublicToken via LinkToken #62

yogirajshakya opened this issue Mar 7, 2022 · 2 comments

Comments

@yogirajshakya
Copy link

I successfully generated link token via CreateLinkTokenRequest.
Now, I am trying to get a public token via CreatePublicTokenRequest, so that i can get an access token via ExchangeTokenRequest.
But, I am getting error "ErrorMessage = "This endpoint has been discontinued as of version '2020-09-14' of the API." in CreatePublicTokenRequest.
And in the parameters of CreatePublicTokenRequest, it is taking expecting AccessToken instead of LinkToken

var response = await client.CreatePublicTokenAsync(new Acklann.Plaid.Management.CreatePublicTokenRequest
{
ClientId = clientId,
Secret = clientSecret,
AccessToken = linkToken
});

Could anyone please help on this?

@viceroypenguin
Copy link
Contributor

@yogirajshakya - Please review the following code: https://github.com/viceroypenguin/Going.Plaid/blob/master/tests/Plaid.Demo/Controllers/HomeController.cs#L25 Notice that the link token is provided to the browser, which then handles doing authentication. The browser then issues back to the server with a public token, which is translated to an access token. The access token is what you will keep long-term. Also, recommend you switch to Going.Plaid nuget package, which has more current and complete version of the APIs.

@yogirajshakya
Copy link
Author

Thanks for replying. My bad I got some things wrong.
Still I am confused, what does this mean "The browser then issues back to the server with a public token, which is translated to an access token."
How can a browser issues a public token and how it can be translated into access token?

What I got from Plaid Postman collection, first I need to get a public token via public_token/create, then get the access token via public_token/exchange, by using public token.

I am really confused what APIs I actually need. I need to use Plaid with Stripe to authenticate user and make payment.
Could you please suggest any article or link for that?
And I am not sure which version of Going.Plaid, I need for Asp.Net core 3.1 and c#8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants