Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"info": {
"_postman_id": "d65cfc0b-e236-4216-9119-098c25608649",
"name": "PushKitTest",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Send notification",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "Bearer CgB6e3x9aAsJsxGgxgasZWXyu63iI9H/bwuVZFKbJfRjcCjP0LCJYpep4UAkZj33jknaHBRLWTRnTxHKcMfzOxBj",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"validate_only\": false,\n \"message\": \n {\n \"notification\":\n {\n \"title\": \"Huawei Push Kit\",\n \"body\": \"Hello, I'm a Push Kit.\"\n },\n \"android\":\n {\n \"notification\":\n {\n \"click_action\":\n {\n \"type\": 3\n }\n }\n },\n \"token\": [\"ANPpqLe8aTPl9tsB2Iu_820GmUQ-prH-dzPV-orbkm9yym2bitxd3emgxglrkVJW8hbTkusjHCu2_RW-AdnqqSbHevBQYwhjqOBzCdcu_Zrqfzuowi7Sxp4c2r_ztTORVQ\"]\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://push-api.cloud.huawei.com/v1/app_id/messages:send",
"protocol": "https",
"host": [
"push-api",
"cloud",
"huawei",
"com"
],
"path": [
"v1",
"103346107",
"messages:send"
]
}
},
"response": []
},
{
"name": "Send data message",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "Bearer CgB6e3x9aAsJsxGgxgasZWXyu63iI9H/bwuVZFKbJfRjcCjP0LCJYpep4UAkZj33jknaHBRLWTRnTxHKcMfzOxBj",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"validate_only\": false,\n \"message\": \n {\n \"data\": \"{\\\"title\\\":\\\"Huawei Push Kit\\\",\\\"text\\\":\\\"Hi, I'm a Push Kit.\\\",\\\"channel_id\\\":\\\"channel_1\\\"}\",\n \"token\": [\"ANPpqLe8aTPl9tsB2Iu_820GmUQ-prH-dzPV-orbkm9yym2bitxd3emgxglrkVJW8hbTkusjHCu2_RW-AdnqqSbHevBQYwhjqOBzCdcu_Zrqfzuowi7Sxp4c2r_ztTORVQ\"]\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://push-api.cloud.huawei.com/v1/app_id/messages:send",
"protocol": "https",
"host": [
"push-api",
"cloud",
"huawei",
"com"
],
"path": [
"v1",
"103346107",
"messages:send"
]
}
},
"response": []
},
{
"name": "Get access token",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
},
{
"key": "client_id",
"value": "103346107",
"type": "text"
},
{
"key": "client_secret",
"value": "1e35055832e028a9b07251ad1f9192b2ffbf4551cd71bfbb005875b046f0b981",
"type": "text"
}
],
"options": {
"urlencoded": {}
}
},
"url": {
"raw": "https://oauth-login.cloud.huawei.com/oauth2/v2/token",
"protocol": "https",
"host": [
"oauth-login",
"cloud",
"huawei",
"com"
],
"path": [
"oauth2",
"v2",
"token"
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment