How can I create a Multiple choice polls in an existing group?

34 views
Skip to first unread message

fan....@hccs-md.org

unread,
May 5, 2016, 1:34:37 PM5/5/16
to Poll Everywhere Development & API Mailing List
I'm able to create multiple choice poll via API. However it always created in "Ungroup".  How can I create it in existing group?

Paul Poll Everywhere

unread,
May 5, 2016, 2:40:26 PM5/5/16
to Poll Everywhere Development & API Mailing List
We do not have a public, supported API for interacting with groups. (The supported API is documented here.) However, you can add a new poll to a group by specifying the `group_id` attribute. You can get a list of group IDs by making a request to https://www.polleverywhere.com/api/groups.json

Here is an example with curl:

curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Basic YXBpdGVzdDphcGl0ZXN0" -d "{ \"multiple_choice_poll\": {\"group_id\": 12345,\"title\":\"Hey dude\!\",\"options\":[{\"value\":\"red\"},{\"value\":\"blue\"}]} }" "https://www.polleverywhere.com/multiple_choice_polls"

If you require a supported API, please contact us to discuss what we can do for you.

fan....@hccs-md.org

unread,
May 10, 2016, 10:36:08 AM5/10/16
to Poll Everywhere Development & API Mailing List
thanks for the information.  I tried but got 500 internal error: 
IsSuccessStatusCode: false
ReasonMessage: Internal Server Error
RequestMessage:{Method: POST, RequestUri: https://api.polleverywhere.com/multiple_choice_polls Version 1.1, Content: System.Net.Http.StringContent, Headers:
{ Accept: application/json
  Authorization: Basic ....
  Content-Type: application/json; charset=utf-8
  Content-Length: 5408

fan....@hccs-md.org

unread,
May 10, 2016, 11:07:31 AM5/10/16
to Poll Everywhere Development & API Mailing List
{StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  Connection: keep-alive
  Date: Tue, 10 May 2016 15:05:54 GMT
  Server: nginx/1.8.0
  Content-Length: 192
  Content-Type: text/html
}}
    Content: {System.Net.Http.StreamContent}
    Headers: {Connection: keep-alive
Date: Tue, 10 May 2016 15:05:54 GMT
Server: nginx/1.8.0
}
    IsSuccessStatusCode: false
    ReasonPhrase: "Internal Server Error"
    RequestMessage: {Method: POST, RequestUri: 'https://api.polleverywhere.com/multiple_choice_polls', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
{
  Accept: application/json
  Authorization: Basic ENCODED
  Content-Type: application/json; charset=utf-8
  Content-Length: 23044
}}
    StatusCode: InternalServerError
    Version: {1.1}

Paul Poll Everywhere

unread,
May 10, 2016, 1:22:35 PM5/10/16
to Poll Everywhere Development & API Mailing List
On Tuesday, May 10, 2016 at 8:07:31 AM UTC-7, fan....@hccs-md.org wrote:
    RequestMessage: {Method: POST, RequestUri: 'https://api.polleverywhere.com/multiple_choice_polls', Version: 1.1, Content: System.Net.Http.StringContent, Headers:

fan....@hccs-md.org

unread,
May 10, 2016, 2:56:28 PM5/10/16
to Poll Everywhere Development & API Mailing List
Changed to www.polleverywhere.com, still got 500 error. 

fan....@hccs-md.org

unread,
May 11, 2016, 7:35:48 AM5/11/16
to Poll Everywhere Development & API Mailing List
It's so weir; run same code on a different computer in a different network (remote in), the poll was created successfully.
Reply all
Reply to author
Forward
0 new messages