zepp-health / rest-api

251 stars 33 forks source link

How can i sent notification via API ? #14

Open tntkhang opened 4 years ago

tntkhang commented 4 years ago

I follow the document and try to sent notification to Watch but I got the error: "-1013 Unsupported Media Type".

Call by POSTMAN

Could you guys please take a look is there any wrong data on my request?

POST: https://api-open.huami.com/notifications

Authen: Bearer Token: PQVBQDpyQktGXip6SltGeiouXAQABAAAAAO3q1IX2lVZzXjIy6QxPF3mVhjyUsXpUq3jwxDZz1lR0C6rBFjleAVo7TCIoVF3hyLjt05yicEsHt79B2eftaHNStouN5tqxtgIvWmf85oo9muRVMFkAXxk-s4EdWiYhhe2HIne3fUAM-cSpv_zWzsbeUI_GRdHbGwbHax07ASNZ

Body raw: { "messageId" : "4f1919f0-2592-48cf-96ee-a1008cd930ff", "deviceNotificationEffect" : { "vibrationConfig" :{ "mode" : "NORMAL" }, "message" : { "title" : "Title", "body" : "test device message body", "message": "Mess" }, "icon" : { "uri" : "https://www.computerhope.com/jargon/j/jpg.jpg" }, "timer" : { "schedule" : "0 0 12 * * ?", "disabled" : false } } }

Thanks