Sandbox webhook transfer not working
bradherman opened this issue · comments
Ruby 3.3.0
Plaid Ruby 26.0.1
response = client.sandbox_transfer_fire_webhook("https://mywebhookurl")
returns
Plaid::ApiError: Error message: the server returns an error
HTTP status code: 400
Response headers: {"server"=>"nginx", "date"=>"Tue, 02 Apr 2024 19:53:23 GMT", "content-type"=>"application/json; charset=utf-8", "content-length"=>"229", "connection"=>"keep-alive", "content-encoding"=>"gzip", "vary"=>"Accept-Encoding"}
Response body: {
"display_message": null,
"documentation_url": "https://plaid.com/docs/?ref=error#invalid-request-errors",
"error_code": "INVALID_BODY",
"error_message": "body could not be parsed as JSON",
"error_type": "INVALID_REQUEST",
"request_id": "wgabDyTtBh0FtsO",
"suggested_action": null
}
Within the logs inside the Plaid dashboard, I'm seeing the following fields are not recognized by this endpoint: webhook_url
Thanks for the report! I think the issue is that the sample code in the docs is wrong -- I'll make sure to get it updated. The correct way to call this endpoint is something like this:
fire_webhook_request = Plaid::SandboxTransferFireWebhookRequest.new({ webhook: "https://enn0el5jdwcvp.x.pipedream.net" })
response = client.sandbox_transfer_fire_webhook(fire_webhook_request)