简体   繁体   English

如何通过Coinbase Api v2发送ping通知?

[英]How to send ping notification through Coinbase Api v2?

I'm trying to receive "wallet:addresses:new-payment" notification using Coinbase Api. 我正在尝试使用Coinbase Api接收“wallet:addresses:new-payment”通知。 But automatic sending to my server is not working. 但是自动发送到我的服务器不起作用。

So I want to send "ping" notification to my server to check is everything is ok. 所以我想向我的服务器发送“ping”通知,检查一切正常。 Description of their API is saying that "Ping notification can be send at any time to verify that the notification URL is functioning" https://developers.coinbase.com/api/v2?shell#notification-resource But can't find how to send ping. 他们的API说明是“可以随时发送Ping通知以验证通知URL是否正常运行” https://developers.coinbase.com/api/v2?shell#notification-resource但是找不到如何发送ping。

PS I set notification url in Api setting in my profile. PS我在个人资料中的Api设置中设置了通知网址。 And i can get the list of notifcations of my address. 我可以获得我的地址通知清单。 All notifications are there. 所有通知都在那里。 https://developers.coinbase.com/api/v2?shell#list-address39s-transactions https://developers.coinbase.com/api/v2?shell#list-address39s-transactions

Hope you can help me to find the way to send a ping. 希望你能帮我找到发送ping的方法。 Thanks. 谢谢。

You send ping a similar way you would send any notification type like: wallet:addresses:new-payment or wallet:buys:completed . 您发送ping的方式类似于发送任何通知类型,例如: wallet:addresses:new-paymentwallet:buys:completed

This is how you would send a ping: 这是你发送ping的方式:

{
  "id": "6bf0ca21-0b2f-5e8a-b95e-7bd7eaccc338",
  "type": "ping",
  "data": {},
  "additional_data": {},
  "user": {
    "id": "f01c821e-bb35-555f-a4da-548672963119",
    "resource": "user",
    "resource_path": "/v2/users/f01c821e-bb35-555f-a4da-548672963119"
  },
  "account": {
    "id": "8d5f086c-d7d5-58ee-890e-c09b3d8d4434",
    "resource": "account",
    "resource_path": "/v2/accounts/8d5f086c-d7d5-58ee-890e-c09b3d8d4434"
  },
  "delivery_attempts": 0,
  "created_at": "2019-07-23T19:15:06Z",
  "resource": "notification",
  "resource_path": "/v2/notifications/6bf0ca21-0b2f-5e8a-b95e-7bd7eaccc338"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM