Resource icon

[bd] API 1.6.1

No permission to download

xfrocks

Well-known member
Any hope that the current version works with XF 2? Or should I wait?
The current version does not work with XenForo 2. You can't even install it. We are working hard for an upgrade, so stay tuned.

Also, I'm using the original api.php file in connection with authentication for a password-protected access to downloading files from our premium area, which requires a member upgrade. Does this version straight-on replace that one, or must I have someone recode the file we use to interact with api.php?

If only I was a PHP developer.
There is no "original api.php" file in XenForo so it's most likely you were using a different add-on. You will need to reimplement authentication if you switch to this one (and its XenForo 2 version).
 

Gene Steinberg

Well-known member
I'd need help to reimplement. It appears to work with just one version of the api.php that I've tried out of three. If I posted the script that calls it, would that help?
 

xfrocks

Well-known member
xfrocks updated [bd] API with a new update entry:

Feature Update 1.6.1

  • PHP 7.2 support
  • Added option to control limit and range of data accessible via API
  • Added GET /tags/list
  • Added GET /tags/:tagId
  • Added POST /tools/ott
  • Added param creator_user_id for GET `/threads/
  • Added param thread_prefix_id for GET `/threads/
  • Added param thread_tag_id for GET `/threads/
  • Added param quote_post_id for POST `/posts/
  • Added first_poster_avatar into links in thread data
  • Added post_origin into post data
  • Added user_external_auth into user...
Read the rest of this update entry...
 
The current version does not work with XenForo 2. You can't even install it. We are working hard for an upgrade, so stay tuned.
@xfrocks is it possible to get any indication at all about this? just to know if we're talking weeks or months :oops:
We're at a crossroad with the development of a very big project and we have a decision to make depending on this.


Mehdi
 

xfrocks

Well-known member
@xfrocks is it possible to get any indication at all about this? just to know if we're talking weeks or months :oops:
We're at a crossroad with the development of a very big project and we have a decision to make depending on this.


Mehdi
Our internal tracking is looking towards a beta release in about 2 weeks FYI. Hope that works for you?
 
@xfrocks any chance at getting the ability to have an 'admin' token soon?

I think I mentioned it before, but I'd like to have a singular token that was for an admin that was 'unlimted' so that I can use that to combine actions between my XF install and another site
 

xfrocks

Well-known member
@xfrocks any chance at getting the ability to have an 'admin' token soon?

I think I mentioned it before, but I'd like to have a singular token that was for an admin that was 'unlimted' so that I can use that to combine actions between my XF install and another site
One way we are doing "admin" token in our sites is to create a new token with long expire time, e.g. a year. You can create that in AdminCP. It's recommended to rotate your keys often though so 365-day token is quite decent.
 
@Valiantiam @overifist @xfrocks
I've just managed to get this working with RocketChat!
It does take some manual editing of code on RocketChat though (I will try and submit it to them for a future patch, if I can figure out how github works!)

Firstly, these are the settings you need (obviously change the URL to match your forum location):
View attachment 160530

In Rocket.Chat, you then need to edit the following file:
/opt/Rocket.Chat/programs/server/packages/rocketchat_custom-oauth.js
(adjust if you've installed it elsewhere)

Go down to about line 254 and add the following in between the other if statements:
JavaScript:
// Fix for Xenforo [BD]API
if (identity.user && identity.user.user_id && !identity.id) {
    identity.id = identity.user.user_id;
    identity.email = identity.user.user_email;
}
So it should look something like:
JavaScript:
if (identity.CharacterID && !identity.id) {
        identity.id = identity.CharacterID;
}// Fix Dataporten having 'user.userid' instead of 'id'

// Fix for Xenforo [BD]API
if (identity.user && identity.user.user_id && !identity.id) {
        identity.id = identity.user.user_id;
        identity.email = identity.user.user_email;
}

if (identity.user && identity.user.userid && !identity.id) {
        identity.id = identity.user.userid;
        identity.email = identity.user.email;
} // Fix general 'phid' instead of 'id' from phabricator
Then restart the Rocket.Chat service so it picks up the new file and that should do it!
Glad to report that this update was included in the 0.60 update of Rocket.Chat. I've tested it along with your updates shown here on my server and it is working with no issues. Looking forward to the release of the API for XenForo 2.0. Thanks!
 
We use Xenforo SDK to integrate our membership plugin with Xenforo.It works fine with Xenforo v1.x. So when a user is added to our membership database in wordpress, we are able to automatically add the users to xenforo using APIs.But after upgrade to xenforo v2.x, this integration no longer works. And there seems to be no documentation on this so we are really struggling to find a way to integrate our membership plugin with xenforo v2.x.
 

xfrocks

Well-known member
We use Xenforo SDK to integrate our membership plugin with Xenforo.It works fine with Xenforo v1.x. So when a user is added to our membership database in wordpress, we are able to automatically add the users to xenforo using APIs.But after upgrade to xenforo v2.x, this integration no longer works. And there seems to be no documentation on this so we are really struggling to find a way to integrate our membership plugin with xenforo v2.x.
The XenForo 2 version of this add-on hasn't been released yet. The current version does not work with XenForo 2, it should show up as Disabled on AdminCP.
 
Top