How do I create a new Thread with an embedded Poll using REST?

Hi all,

My question: How can I use REST to embed a new Poll into a Forum Thread?

What I know... I am very familiar with the Telligent REST API but I am new to creating Polls.  I have looked at the embed code used for polls, which seems straight-forward, and I have used GET api.ashx/v2/poll/{id}.json to fetch a poll, so I think I have a good handle on the structure.

What I have tried...

  • I tried adding the poll embed code to a new Thread without ID values on the off chance that the processing would auto-generate a new poll and insert the values - it didn't (just trying to be thorough).
  • I tried using a REST call to POST /api.ashx/v2/poll.json, which fails with "Can't perform actions by ContentUrl outside of authenticated OAuth request.".  I am using an API with the REST API as OAuth doesn't fit my use case of migrating content.
    • Side note: this endpoint requires the contentUrl, which seems to imply a three step process of creating the Thread first, creating the Poll, then updating the Thread with the Poll embed code/
  • I tried using the deprecated REST call POST /api.ashx/v2/forums/{forumId}/threads/{threadId}/pollitems.json, which failed with "An unexpected error prevented your requested action from completing" (the server side error was "No matching bindings are available")

Any tips would be appreciated.
 

Parents
  • Polls are an embeddable content fragment type with Type ID: 

    33ecb077-39b7-4078-9b1e-dc3f977a690b

    To insert a poll, the embed code format is:

    [embed:UNIQUEID:TYPEID:CONFIGURATION]

    Where

    • TYPEID is the GUID identifier of the embeddable type.
    • UNIQUEID is a new GUID to identify this instance of the embeddable type.
    • CONFIGURATION is the querystring encoded configuration for this instance of the embeddable type.

    The configuration options for a poll can be retrieved by reviewing a poll created using the on-site UI. If you need more details about those options, please let me know.

    Saving a forum thread using the regular thread create endpoint with this embed code will cause a poll to be created within the thread.

Reply
  • Polls are an embeddable content fragment type with Type ID: 

    33ecb077-39b7-4078-9b1e-dc3f977a690b

    To insert a poll, the embed code format is:

    [embed:UNIQUEID:TYPEID:CONFIGURATION]

    Where

    • TYPEID is the GUID identifier of the embeddable type.
    • UNIQUEID is a new GUID to identify this instance of the embeddable type.
    • CONFIGURATION is the querystring encoded configuration for this instance of the embeddable type.

    The configuration options for a poll can be retrieved by reviewing a poll created using the on-site UI. If you need more details about those options, please let me know.

    Saving a forum thread using the regular thread create endpoint with this embed code will cause a poll to be created within the thread.

Children