bcemmett / SurveyMonkeyApi-v3

Library for querying SurveyMonkey's v3 API
MIT License
37 stars 24 forks source link

Create Collectors, Recipients and Send Email Survey #56

Open brandymiller opened 7 years ago

brandymiller commented 7 years ago

Does SurveyMonkeyApi-v3 allow me to create collectors and attach a recipient list and message to it to send out an email survey? v2 appears to have some of this functionality. I do see CreateCollector. I've tried using the following code to test it, but receive this error "Http status: 400, error code 1002. Bad Request: Invalid schema in the body provided.. See https://developer.surveymonkey.com/api/v3/#error-codes for more information."

                var collectorSettings = new SurveyMonkey.RequestSettings.CreateCollectorSettings();
                collectorSettings.AllowMultipleResponses = false;
                collectorSettings.AnonymousType = Collector.AnonymousOption.NotAnonymous;
                collectorSettings.ClosedPageMessage = "Thank you";
                collectorSettings.DisplaySurveyResults = true;
                collectorSettings.DisqualificationMessage = "message";
                collectorSettings.EditResponseType = Collector.EditResponseOption.UntilComplete;
                collectorSettings.Name = "Brandy Test Collector";
                collectorSettings.Password = "password";
                collectorSettings.RedirectUrl = "www.percepta.com";
                collectorSettings.SenderEmail = "brandy.miller@percepta.com";
                collectorSettings.ThankYouMessage = "Thank You";
                collectorSettings.Type = SurveyMonkey.Containers.Collector.CollectorType.Email;

                sm.CreateCollector(66613634, collectorSettings);
jhroemer commented 5 years ago

I'm interested in the same functionality actually - although I don't think its possible to create the collector solely through code, due to the required e-mail verification. But adding recipients to a collector should be possible, but to me doesn't seem to be supported in SurveyMonkeyApi-v3. @bcemmett can you verify if this is included or not?