Closed eldan88 closed 3 years ago
Can you paste the contents of the raw response from Plaid?
try {
$transactions = $client->transactions->list($token,$start,$end);
} catch (\Exception $e) {
die(print_r($e->getResponse(),true));
}
Thanks for the reply.
INVALID_ACCESS_TOKEN [error_message] => provided token is the wrong type. expected "access", got "public" [error_type] => INVALID_INPUT
This is what I am using to get a token $response = $client->sandbox->createPublicToken("ins_3",array("transactions"));
$token = $response->public_token;
I think your issue is stated in the response:
provided token is the wrong type. expected "access", got "public"
I would recommend reading over Plaid's API documentation, particularly around token management: https://plaid.com/docs/api/tokens/
I dont get it. That is the only token you provide on your library
Each item will have its own access token, I believe you should be using that token. Again, I think reading the API documentation for Plaid and how their workflow and endpoints behave would clear up a lot of the confusion.
Here's a direct link to their documentation on how the public token to access token exchange needs to happen:
https://plaid.com/docs/api/tokens/#token-exchange-flow
For example, with a public token you would call:
$access_token_response = $plaid->items->exchangeToken($public_token);
$access_token = $access_token_response->access_token;
I have tried doing what you mentioned and I am getting this message PRODUCT_NOT_READY [error_message] => the requested product is not yet ready. please provide a webhook or try the request again later
Hi,
I am trying to get a list of transactions and it keeps saying bad request. Not sure what I am doing wrong here. Below is my code