• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
XenAPI - XenForo PHP REST API

Unmaintained XenAPI - XenForo PHP REST API 1.4.2

No permission to download
PHP REST API to use on other projects
Compatible XF 1.x versions
1.0, 1.1, 1.2, 1.3, 1.4, 1.5
Additional requirements
PHP 5.4.0
License
GPLv3
Visible branding
No
Information
This Open Source REST API allows usage of several of XenForo's functions, such as authentication, user information and many other functions!

Actions
Each action requires a hash to perform the action, either an API key or an user hash (username:hash).
The user hash can be grabbed by performing an authentication, the user hash will then be returned in a JSON object.

Currently the only return option is JSON, more will be implemented later.
Click here for a list of actions.

Examples and Documentation
The XenAPI wiki page on Github is fully documented and is full of examples.


Installation
The api.php goes in the root of the XenForo installation.


Development
Feel free to submit Pull Requests/suggestions, track the development or just browse the code on GitHub.

Donations are appreciated
Author
Contex
Downloads
1,013
First release
Last update
Rating
5.00 star(s) 21 ratings

Latest updates

  1. Important update! SQL injection exploit and misc fixes

    Important update! 1.4.1 and lower versions have a SQL injection exploit with the getGroups and...
  2. Added new actions

    Do note that some of the actions are still not documented. You can now: Search through the...
  3. Updated XenAPI to 1.4 - Added create actions and much more

    Do note that some of the actions are still not documented. You can now: Create an alert Create...

Latest reviews

Fantastic! Using this to have an external application we've developed authenticate against XenForo using cURL requests. Would use a bridge except our application is on a separate domain name so this is our solution. Thank you very much.
This is amazing, it provides the best interface I can find to allow me to perform some custom user promotions determined outside of my xF installation. Very high quality documentation as well.
Great plugin and great developer. Contex is extremely friendly and offers support for his plugins during his free time. He is very patient and goes out of his way to help people who are having problems with his plugins. Extremely nice guy!
It's sooooo easy to authenticate an user with his password against the Xenforo users database, awesome! And all the calls to get more info about a specific user, it's a pleasure. And, very friendly and helpful contact!
This is great. I use it to login for my game server. Way better than using MySQL to analyze the tables manually. Great job!
Context is a great guy, I needed to ask him a few things and he was very prompt to answer all my questions via email.

He has developed a working add on, if you need to authenticate your users from another platform, then use this, it's great!

I just wish the documentation was a little clearer, this could save both the user and contexts time, either way he is an awesome developer and I am glad someone built this.
Works as designed :)
Now I can bridge my site and my forums with no problem.
Using curl.
Github wiki will be very helpful when there will be lots of examples, but people can find many working examples in resourse discussion thread.
Thank you!
Very nice and easy to use API. I prefer it over OAUTH.

However you need to make sure you are accessing it over HTTPS or people might be able to see your key.

Some functions are not documented but it was easy to figure out how to use it.

The only thing I have to complain about is that grab_as uses the userid or name. What happens if someone has a number for their name?
Contex
Contex
You make a fair point regarding the "grab_as" parameter, same thing goes for the "user" parameter. It currently checks if the input is an ID first, and then fallbacks to email and then finally username. I'll have to see if I can create a workaround for this, perhaps a new parameter named "user_type" where you specify the type of the grab_as/user parameter (user_id, email and username)?
Perfect API and perfect support!
XenApi is great for working with XenForo from an external site!

Probably the best API to XenForo, I recommend for all your projects.
Superb! And for free! Thank you so much for this excellent API... AWESOME JOB. The register function helped me out with adding users from a wordpress registration function