Status code 400 while publishing with .NET SDK

edited August 2015 in Questions
Hi ,

I am trying to post a sharing message from a console application using .Net SDK as shown below.

OneAllAPI api = OneAllAPI.NewInstance( new Uri(@"mysiteurl"), @"myprivatekey", @"mypublickey", new DisplaySettings() { SameWindow = true }, new DisplaySettings() { SameWindow = true }, new List<string>() { "reddit" }, new List<Provider>() { new Provider() { Name = "reddit" } }); api.Settings.Domain = new Uri("mysiteurl"); UserSharingRequest req = new UserSharingRequest(); SharingUser u = new SharingUser(); u.UserToken = new Guid("myreddituserid");//reddit id retreived from /users.json u.Providers.Add("reddit"); req.PublishForUser = u; req.Parts = new SharingMessageParts() { //Link=new MessageLink(){ Name="Google", Url=new Uri("http://www.google.com")}, //Picture = new MessagePicture() { Url = new Uri("http://www.xpglive.com/favicon.ico") }, //Video = new MessageVideo() { Url = new Uri("http://www.xpglive.com/") }, Text = new MessageText() { Body = "A Sharing API post" }, Indicator = new TrackingIndicator() { EnableTracking = true } }; Response<SharingResult> response = api.SharingPublishMessage(req);


This code works perfectly fine for twitter. And it doesn't work for below providers
1) reddit
2) instagram
3) youtube
4) googleplus

I am getting below error message with status code "400"
"Your request could not be processed due to an error"

Note: I have setup proper permissions from both ends (oneall side and provider side for all the above providers and I am using appropriate ids correctly.

Please help.

Thanks

Best Answer

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team
    Answer ✓
    Hello,

    the error means that our API currently does not supporting publishing for theses providers.
    Currently we only support publishing for VK, Twitter and Facebook.

    Regards,

Answers

  • While debugging further, we got the below error message:"The API did not accept the message: publishing for Reddit is not available" and with error code:"403"

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.