bchavez / Coinbase

:moneybag: A .NET/C# implementation of the Coinbase API.
https://developers.coinbase.com/api/v2
MIT License
170 stars 92 forks source link

Quick Run down of Webhooks #45

Closed granthoff1107 closed 5 years ago

granthoff1107 commented 5 years ago

I'm a bit confused on how the webhooks work. I would like to subscribe to notifications for when a transaction completes.

I see there is a section for webhooks but I don't see where I would pass the callback url to coinbase. If you have time can you give me a quick run down on how, webhooks work.

bchavez commented 5 years ago

In the latest version of the API, I don't think you "pass a callback" URL. Instead, you set one up when creating an API key or registering an OAuth app.

Here are the developer links: https://developers.coinbase.com/docs/wallet/notifications https://developers.coinbase.com/api/v2#notification-resource

Under Settings > API Access, create an API key or OAuth app, there's a section:

chrome_2406

That's where you setup the https://myserver.com/callmebackhere.

Once you have the URL setup and registered with CB, follow the instructions here to verify and process webhook notifications on your callmebackhere endpoint: https://github.com/bchavez/Coinbase#handling-callback-notifications-on-your-server

Hope that helps, Brian

granthoff1107 commented 5 years ago

Thanks, this will be a bit difficult to test but I'll let you know how it goes when I get it done