[bd] API

[bd] API 1.6.3

No permission to download
Here is a working version with XF 2.2.9 and latest version of BD API which supports 2.x.
Note: users/me did not work, so I had to use users/{id} to be able to retrieve member's info like avatar.


To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
Thanks @LuckyRiver but this doesn't really help as what I am seeing here is nothing like we see, especially the Authorise access screen which doesn't exist like yours.

If anyone can help me get this up and running it would be brilliant, for the life of me I have no idea whats going wrong and need to get this working ASAP with mediawiki.
 
Last edited:
Thanks @LuckyRiver but this doesn't really help as what I am seeing here is nothing like we see, especially the Authorise access screen which doesn't exist like yours.

If anyone can help me get this up and running it would be brilliant, for the life of me I have no idea whats going wrong and need to get this working ASAP with mediawiki.
The bdApi is designed to be used only for Xenforo and can't be used for mediawiki.
 
The bdApi is designed to be used only for Xenforo and can't be used for mediawiki.
@LuckyRiver, yes I know. I am connecting from Mediawiki to Xenforo. However, Mediawiki aside, I can't get any response from BDapi on Xenforo, just getting 404s.

The mediawiki part comes into play with the Mediawiki Extension XenForoAuth. However, until I can get some sort of response from the API, I can't even tackle that bit.
 
Trying this out with XenforoAuth on Mediawiki and followed some of the user notes in there as well as here but have not had any luck getting this working.

Got the same problem others have come across with the error index.php?title=Special:CreateAccount&returnto=Main+Page Error: Class 'XenForoBDClient\Clients\OAuth2Client' not found

I can't figure out how to get around this in MediaWiki or to fix what's missing.

Anyone got any ideas or managed to get this working with MediaWiki?
I have that setup working a couple years ago and has been working fine for me. Currently on XF 2.2.9 and MediaWiki 1.35.6. The composer update error may be the issue, may need to investigate that further.
 
@azzurro I got composer to update eventually on the MediaWiki side so I think that is all good.

I think the problem I have is a conflict with another XenForo addon. Once I resolve that and the API is responding, I'll go back and check from the MediaWiki side.
 
@LuckyRiver, yes I know. I am connecting from Mediawiki to Xenforo. However, Mediawiki aside, I can't get any response from BDapi on Xenforo, just getting 404s.

The mediawiki part comes into play with the Mediawiki Extension XenForoAuth. However, until I can get some sort of response from the API, I can't even tackle that bit.
Without testing MediaWiki, have you tried first testing the bdApi url, client id and client secret to see if the bdApi endpoint responds since you have to put these configs in the XenForoAuth plugin afterwards ?
I will check it out first to see if I receive a 404 not found.
Also which version of Xenforo and bdApi are you using?
 
The API runs up to latest Xenforo version, but it have 2 installs - one for wordpress and one for xenforo.

Edit: Sorry I see now this is the old API for Xenforo 1.x not the latest for 2.x
 
IIRC:

  • clone the repo
  • checkout xenforo2 branch
  • copy its contents to src/addons/Xfrocks/Api/
  • copy the contents of _files/ to your Xenforo root directory
  • you'll have to rename the included api directory to bdapi (or something similar) because Xenforo uses the path prefix /api for its own REST API.
  • Add an option in config.php: $config['api']['apiDirName'] = "<name>"; where <name> is the name of the directory which was renamed from api (see next post from @sub_ubi)
  • after that, enable it in XenForo

(it's possible that I forget something to mention, I'm sorry if that's the case – maybe we can create a complete list of needed installation steps here in this thread)
 
Last edited:
Here's what we're using.

You can rename /upload/<api>/ to a different name if you want to use XF's api as well and are worried about conflicts.

Add this in XF's config.php:
PHP:
$config['api']['apiDirName'] = "<name>";

custom_22b1.zip is from the latest commit in the repo (I believe), but with a function I added to User.php for communicating with XF's API. Probably not something you need. I'm also including an older untouched "release" version they used to host on xfrocks,

edit2: renamed files for clarity
 

Attachments

Last edited:
(it's possible that I forget something to mention, I'm sorry if that's the case – maybe we can create a complete list of needed installation steps here in this thread)
If the next release of XF breaks this and/or doesn't add oauth support, I'm happy to help organize for maintenance.
 
Top Bottom