Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i sent notification via API ? #14

Open
tntkhang opened this issue Feb 28, 2020 · 0 comments
Open

How can i sent notification via API ? #14

tntkhang opened this issue Feb 28, 2020 · 0 comments

Comments

@tntkhang
Copy link

tntkhang commented Feb 28, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant