PDA

View Full Version : VBulletin REST API api.init error


jpr
03-15-2016, 03:12 PM
Hello,
We have a CGI script that invokes vBulletin REST API functions. It was working fine for a while. Without any changes to my code whatsoever, but with possible modifications to the vBulletin configuration (but not by me), invoking api.init is not giving me the response that I am expecting.

I am passing all of the correct parameters (as I mentioned it was working fine and there have been no code changes since then). I used to get a JSON response HASH like this:

{
'show' => {
'registerbutton' => 1
},
'permissions' => [],
'features' => {
'taggingenabled' => 1,
'blogenabled' => 1,
...
}

But now I am getting this response. Any idea why I would get such (a very unhelpful) response? I'm stumped. I must assume it has to do with vBulletin 5 configuration because the code has not changed one bit. Here is the response that I am currently getting:
[
[
'node_permission',
2,
'node'
]
]

I verified that the API is enabled and that the API key is correct (although the API key is not sent to api.init). I searched everywhere and found nothing. Any help/tips would be appreciated.

--------------- Added 1458069943 at 1458069943 ---------------

vBulletin support was no help. I had to read the vBulletin code, line by line, to figure this out.

SOLUTION:
In admincp, select "Channel Permissions", under 'Forum', click [Edit] for "Unregistered/Not Logged In", and set "Can View Channels" option to Yes.

I don't know why setting it to No breaks the API, but it does. In my opinion this was a horrible design choice.