0

I am working with c# on a forum tool for invision powerboard but i am getting stuck.

I want to create forums with the tool and it is almost working except for 1 part. The permissions part...

According to their api wiki it says this:

permissions - object - An object with the keys as permission options (view, read, add, reply, attachments) and values as permissions to use (which may be * to grant access to all groups, or an array of group IDs to permit access to)

Now what i have in my code is this:

public class OjbectExample
        {
            public string Key_ { get; set; }
            public string[] Value_ { get; set; }
        }

And then this (I also tested it with int array):

string[] marks = new string[] { "3", "6", "8", "9", "10", "12", "13", "14", "4" };
OjbectExample obj = new OjbectExample() { Key_ = "view", Value_ = marks };

And then in the parameters part:

request.AddParameter("permissions", obj);

But it just responses with "Unknown Error" Anyone got a idea what i am doing wrong? If i remove the permissions parameter it creates the forum, tough it wont when i set up the permissions...

Thank you in advance!

Edit: After some digging i found out these are the values the "object" needs. They are as i see in the database a "text" value?

perm_view = "3,4,6,8"
perm_2 = "3,4,6,8"
perm_3 = "3,4,6,8"
perm_4 = "3,4,6,8"
perm_5 = "3,4,6,8"
perm_6 = "3,4,6,8"
perm_7 = "3,4,6,8"

But i tried multiple things for sending them as a "object" but nothing works Any suggestion here ?

DrEvilicious
  • 15
  • 2
  • 8
  • so you are trying to pass the `obj` to some query or stored procedure? if yes then database doesn't understand this, you need to pass the supportive datatypes – Vivek Nuna Feb 28 '21 at 12:41
  • Thank you for a reply! I think if i understand you correct its a query? https://invisioncommunity.com/developers/rest-api?endpoint=forums/forums/POSTindex It happens through a REST API – DrEvilicious Feb 28 '21 at 12:55
  • After some digging i found out that in the database it is just a "text" But now i need a way to send the correct object inside the post to the "website" – DrEvilicious Feb 28 '21 at 18:07

0 Answers0