[bd] API

[bd] API 1.6.3

No permission to download
Any way to set a user's user groups ?

EDIT:
Found it in documentation: PUT /users/:userId
Great plugin!
 
Last edited:
The 'thread_prefix_id' option for POST /threads doesn't to work for me. The thread is created but no prefix and no prefix id information is returned from the API with the thread json. If I look at the database table xf_thread and change the prefix_id to 5 (my prefix id) it then shows up with a prefix. Just unable to set it via the API.

When i look at my post headers, I see the thread_prefix_id option going out.

POST /api/index.php?/threads HTTP/1.1
Host: forum.righttorebel.net
Accept: */*
Content-Length: 2016
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
DATA: oauth_token=xxxxxxxxxx&forum_id=23&thread_prefix_id=5&thread_title=etc&post_body=bleh&thread_tags=test​

Any ideas ?
 
The 'thread_prefix_id' option for POST /threads doesn't to work for me. The thread is created but no prefix and no prefix id information is returned from the API with the thread json. If I look at the database table xf_thread and change the prefix_id to 5 (my prefix id) it then shows up with a prefix. Just unable to set it via the API.

When i look at my post headers, I see the thread_prefix_id option going out.

POST /api/index.php?/threads HTTP/1.1
Host: forum.righttorebel.net
Accept: */*
Content-Length: 2016
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
DATA: oauth_token=xxxxxxxxxx&forum_id=23&thread_prefix_id=5&thread_title=etc&post_body=bleh&thread_tags=test​

Any ideas ?
Which version are you on? `thread_prefix_id` in POST /threads is fairly new (according to the doc, it's available since forum-2016031001)
 
When i download the zip from Github it's missing the /Lib/oauth2-server-php/src/ directory for some reason. So I'm getting a PHP require error:

PHP Warning: Uncaught exception 'ErrorException' with message 'require(/var/web/hosts/forumsite.com/library/bdApi/Lib/oauth2-server-php/src/OAuth2/Autoloader.php): failed to open stream: No such file or directory'
Edit: I had to go to the directory directly on GitHub to get /oauth2-server-php/src/ for some reason. Works now.
 
When i download the zip from Github it's missing the /Lib/oauth2-server-php/src/ directory for some reason. So I'm getting a PHP require error:

PHP Warning: Uncaught exception 'ErrorException' with message 'require(/var/web/hosts/forumsite.com/library/bdApi/Lib/oauth2-server-php/src/OAuth2/Autoloader.php): failed to open stream: No such file or directory'
Edit: I had to go to the directory directly on GitHub to get /oauth2-server-php/src/ for some reason. Works now.
Yeah, it references another github repo for those files. You can follow the link on github (like you did) or you can reuse those files in the zip package. Let me know if you still have issues with thread prefix.
 
Quick question @xfrocks , does the Xenforo and WordPress installation have to use the same db or url? I am thinking about moving my blog to a separate domain but want it connected to the forum. Just curious before I venture off moving stuff.
 
Quick question @xfrocks , does the Xenforo and WordPress installation have to use the same db or url? I am thinking about moving my blog to a separate domain but want it connected to the forum. Just curious before I venture off moving stuff.
No. They can be different servers etc.
 
Just moved our XF instance to a new server with PHP 7 -- now all API calls to post fail with


array(6) {
["_origRoutePath"] => string(6) "posts/"
["_matchedRoutePath"] => string(6) "posts/"
["_exception"] => string(2051) "ErrorException: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/nginx/forum/library/Zend/Filter/PregReplace.php:171
Stack trace:
#0 [internal function]: XenForo_Application::handlePhpError(2, 'preg_replace():...', '/home/nginx/for...', 171, Array)

Any insight on what might be happening here?
 
Yup, I saw that a while ago, you have to search for the preg_replace and replace it with, um, something else. Quick Google search will find it. Not just an SMF thing.
 
Could I use this to auto post from a new account that I make for something like an IFTT recipe?

The end result would be every time I tweet it would take the URL for that tweet and put it into a specific thread with a specific user ID making the post.
 
Could I use this to auto post from a new account that I make for something like an IFTT recipe?

The end result would be every time I tweet it would take the URL for that tweet and put it into a specific thread with a specific user ID making the post.
Should be possible, I will see if I can make a ifttt recipe for that.
 
Can I use this to synch accounts & user upgrades for members between sites?

i.e. A member can log into site A and purchase a user upgrade, which will then also be active on site B
 
Top Bottom