Invision Api forums/forums

237 Views Asked by At

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 ?

0

There are 0 best solutions below