{ "id": "149641", "key": "AC-222", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2015-12-08T09:39:22.000+0000", "created": "2015-07-12T21:08:18.000+0000", "labels": [ "acs", "docs", "push", "pushnotification" ], "versions": [], "issuelinks": [], "assignee": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updated": "2015-12-08T09:39:22.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14560", "name": "Arrow Push" } ], "description": "See https://community.appcelerator.com/topic/2563/acs-arrow-push-push-to-multiple-channels-delimited-by-a-comma-does-not-seem-to-work-as-per-docs for background and full notes.\r\n\r\nFrom that post...\r\n\r\n\r\nI'm trying to push notifications to multiple channels, we should be able to just pass multiple channels into the Appcelerator Push API.\r\n\r\nThe docs state channel can be a single word, a comma delimited list or an array. So either the docs are wrong/not clear, or the API doesn't work as described.\r\n\r\nAppcelerator docs at...\r\nhttp://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-notify\r\n...it says...\r\nchannel : String/String[] required\r\nName of the channel. For multiple channels, either comma-separate the list of channels or use an array of strings.\r\nThe name of the push channel cannot start with a hash symbol ('#') or contain a comma (',').\r\n\r\nThe two commands to send a push from linux/osx terminal (with curl)...\r\n\r\n log-in...\r\n curl -b cookies.txt -c cookies.txt -F \"login=MYUSERNAME\" -F \"password=MYPASSWORD\" https://api.cloud.appcelerator.com/v1/users/login.json?key=MYAPIKEY&pretty_json=true\r\n\r\n send push...\r\n curl -b cookies.txt -c cookies.txt -F \"channel=year3\" -F \"to_ids=everyone\" -F \"payload=test\" https://api.cloud.appcelerator.com/v1/push_notification/notify.json?key=MYAPIKEY&pretty_json=true\r\n\r\n...and that works fine.\r\n\r\nWe should just be able to modify the second one to push to multiple channels, like...\r\n\r\n curl -b cookies.txt -c cookies.txt -F \"channel=year3,year4\" -F \"to_ids=everyone\" -F \"payload=test\" https://api.cloud.appcelerator.com/v1/push_notification/notify.json?key=MYAPIKEY&pretty_json=true\r\n\r\n...but that does not work, we get a...\r\n\"code\":400,\"status\":\"fail\",\"message\":\"Subscription not found\",\"method_name\":\"Notify\"\r\n\r\nAny ideas? Am I doing something wrong, misunderstanding the docs, or have I found a bug?\r\n\r\nThanks\r\nAndy", "attachment": [], "flagged": false, "summary": " ACS / Arrow Push - push to multiple channels, delimited by a comma does not seem to work as per docs", "creator": { "name": "AndyG", "key": "andyg", "displayName": "Andy Gaskell", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "AndyG", "key": "andyg", "displayName": "Andy Gaskell", "active": true, "timeZone": "Europe/London" }, "environment": "API Issue, via CURL or PHP request.\r\n\r\nAs it is an API issue, I'd guess environment is less useful, but...\r\n\r\nuname -a...\r\nLinux asus-12 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\ncurl -V\r\ncurl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3\r\nProtocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp \r\nFeatures: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP", "comment": { "comments": [ { "id": "359891", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~AndyG],\r\n\r\nBefore sending push to the multiple channels, you have to subscribers those channels did you do that? And could you please share your test code and steps to reproduce? \r\n\r\nThanks.", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-08-14T09:15:11.000+0000", "updated": "2015-08-14T09:15:11.000+0000" }, { "id": "359929", "author": { "name": "AndyG", "key": "andyg", "displayName": "Andy Gaskell", "active": true, "timeZone": "Europe/London" }, "body": "Hi Motiur\r\n\r\nThanks for the comment. I tested the channels independently, and they worked fine, so devices are subscribed ok.\r\n\r\nSo...\r\n{{curl -b cookies.txt -c cookies.txt -F \"channel=year3\" -F \"to_ids=everyone\" -F \"payload=test\" https://api.cloud.appcelerator.com/v1/push_notification/notify.json?key=MYAPIKEY&pretty_json=true}}\r\n...and...\r\n{{curl -b cookies.txt -c cookies.txt -F \"channel=year4\" -F \"to_ids=everyone\" -F \"payload=test\" https://api.cloud.appcelerator.com/v1/push_notification/notify.json?key=MYAPIKEY&pretty_json=true}}\r\n...both work and come through to the devices.\r\n\r\nSo I think that verifies the channels are working and devices are subscribed ok.\r\n\r\nIn terms of test code, it is all in PHP, however, to abstracted it, and to simplify reproduction, I adapted it into single lines you could use on a curl enabled shell. So you can reproduce this with two lines pasted from the above post onto a linux/osx terminal.\r\n\r\nSo just log-in using...\r\n{{curl -b cookies.txt -c cookies.txt -F \"login=MYUSERNAME\" -F \"password=MYPASSWORD\" https://api.cloud.appcelerator.com/v1/users/login.json?key=MYAPIKEY&pretty_json=true}}\r\n\r\nAnd send to two channels using...\r\n{{curl -b cookies.txt -c cookies.txt -F \"channel=year3,year4\" -F \"to_ids=everyone\" -F \"payload=test\" https://api.cloud.appcelerator.com/v1/push_notification/notify.json?key=MYAPIKEY&pretty_json=true}}\r\n\r\nYou will have to edit the MYUSERNAME, MYPASSWORD and MYAPIKEY values, and also set up channels with these names in your environment, aside from those elements it should be quite simple to reproduce and validate.\r\n\r\nThanks\r\n\r\nAndy\r\n\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "AndyG", "key": "andyg", "displayName": "Andy Gaskell", "active": true, "timeZone": "Europe/London" }, "created": "2015-08-14T18:37:17.000+0000", "updated": "2015-08-14T18:38:48.000+0000" }, { "id": "359977", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~AndyG],\r\n\r\nThanks for your comment. Could you please share your PHP code which you used to subscribe your device and push to a channel with steps and testing environment.\r\n\r\nThanks.", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-08-15T03:51:13.000+0000", "updated": "2015-08-15T03:59:52.000+0000" }, { "id": "359990", "author": { "name": "AndyG", "key": "andyg", "displayName": "Andy Gaskell", "active": true, "timeZone": "Europe/London" }, "body": "Hi Motiur \r\n\r\nI could share my code and environment, but I think that would only add unnecessary complexity to this thread.\r\n\r\nIt is easiest / simplest to recreate the issue is with those two curl commands on the terminal. By doing it that way you remove all external factors.\r\n\r\nI would demo this in a screen-grab video, but it would contain our username, password and API key, so that rules out that option.\r\n\r\nThanks\r\n\r\nAndy\r\n\r\n", "updateAuthor": { "name": "AndyG", "key": "andyg", "displayName": "Andy Gaskell", "active": true, "timeZone": "Europe/London" }, "created": "2015-08-16T20:00:57.000+0000", "updated": "2015-08-16T20:01:30.000+0000" }, { "id": "372040", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~AndyG],\r\n\r\nIs it still an issue in latest environment (cloud: 3.2.9 & Cloud Push:3.4.0, Ti SDK:5.1.1.GA, 5.1.0.GA) ? Please let us know.\r\n\r\nThanks.", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-12-03T09:54:32.000+0000", "updated": "2015-12-03T09:54:32.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }