[bd] API

[bd] API 1.6.3

No permission to download
Where to obtain the api key and secret?

You have to create them yourself. For example, I used the apg tool to generate random strings, apps like 1password will also do a good job in creating good random strings.

Code:
[mj@neptune:~]
% apg -M LN -n 2 -m 32
enwifagewyicfidjar7frysvijacodry
neiccuinyum7kriushvimirbyohetpas
 
You have to create them yourself. For example, I used the apg tool to generate random strings, apps like 1password will also do a good job in creating good random strings.

Code:
[mj@neptune:~]
% apg -M LN -n 2 -m 32
enwifagewyicfidjar7frysvijacodry
neiccuinyum7kriushvimirbyohetpas

Thank you....im not technical.....which tool? where to download/use this tool?
 
@xfrocks please get back to me. I paid for the webmaster badge/support on your site and since then you stopped responding to our conversation. I've waited over a month.
 
I've got a user trying out the API on my test system.
He's just reported that when he logs in using his account, he gets the following response:
Code:
{
  "scope" : "read post usercp conversate admincp",
  "refresh_token" : "1768ea.......c756a9a",
  "access_token" : "bf2f12....53dee384c862f1",
  "expires_in" : 3600
}
His XF user is not an admin so should not have the admincp scope as far as I'm aware?
"Automatically authorize ADMINCP-scope" is not enabled and neither is the [bd] API: Create Client: permission.
 
Where to obtain the api key and secret?
You can enter anything you like there. For auto generated key/secret pair, use the front-end client management tool. Sorry if it was not clear in the instruction.

@xfrocks please get back to me. I paid for the webmaster badge/support on your site and since then you stopped responding to our conversation. I've waited over a month.
I have responded to your message.

I've got a user trying out the API on my test system.
He's just reported that when he logs in using his account, he gets the following response:
Code:
{
  "scope" : "read post usercp conversate admincp",
  "refresh_token" : "1768ea.......c756a9a",
  "access_token" : "bf2f12....53dee384c862f1",
  "expires_in" : 3600
}
His XF user is not an admin so should not have the admincp scope as far as I'm aware?
"Automatically authorize ADMINCP-scope" is not enabled and neither is the [bd] API: Create Client: permission.
I assume he obtained the token with username/password? That method will grant all scopes available. However, when actual admin permission is required, the system will check for both admincp scope AND the required XenForo administrative permission. So it is still secured.
 
Is there any simple examples anywhere to show simple implementations of this api?
I am looking to get login and logout to work on a single homepage on the same server, but outside the XF folder.
if possible, also to show the loged in username if logged in linking to their profile.
Thankyou, this looks promising.

sample ie:
The code to add into my external page to make this work
 
Is there any simple examples anywhere to show simple implementations of this api?
I am looking to get login and logout to work on a single homepage on the same server, but outside the XF folder.
if possible, also to show the loged in username if logged in linking to their profile.
Thankyou, this looks promising.

sample ie:
The code to add into my external page to make this work
Take a look here https://github.com/xfrocks/bdApi/tree/master/php_demo
Hope it helps.
 
Thanks.
I think this is a little above my knowledge for now. maybe later.
I just dont get how to setup the backend part, and what it would allow users to do. I thought it was simply a way to get certain information to show on an external page.
Thanks again.
 
Last edited:
@xfrocks
Many thanks for time dedicated on this example.
To be honest, me too, as @Davey-UK, finding it not very intuitive.
Everytime i'm filling the fields, i'm receiving some "?error=redirect_uri_mismatch" or just bunch of text on backend. :unsure:

UPD:
Meanwhile found more detailed description of the process here: https://github.com/xfrocks/bdApi/blob/master/docs/api.markdown (about oauth2-2015030602 and whole the process). Will try to upgrade plugin again and test using info from here. Thanks!
 
Last edited:
Top Bottom