Customizing SMF > Portals, Bridges, and Integrations
SMF 2.0 "REST" API
Kindred:
The API file called settings.php...
garycarr:
I have create a test script to test connectivity using the API
--- Code: ---require_once('SmfRestClient.php');
$secretKey = 'mykey';
$api = new SmfRestClient($secretKey);
$result = $api->check_ifOnline('username');
print_r($result);
--- End code ---
I have enabled API_DEBUG in the SmfRestClient.php and the following url gets returned.
hxxp:www.domain.com/forums/api/check/ifOnline.json?secretKey=mykey&identifier=username [nonactive]
I am not getting any data returned from the API.
I have manually set the path the Settings.php
// specify the settings path here if it's not in smf root and you want to speed things up
$settings_path = $_SERVER['DOCUMENT_ROOT'] . /path/to/forums/Settings.php
Can anyone point to in the direction of what I might be missing?
Thank You in advance!
Thorney:
It's all Greek to me! I'll show my co-admin this, he's much better at the coding stuff than I am!
hebelehubele:
I use this api for login outside to SMF forum.
--- Code: ---require_once('forum/SmfRestClient.php');
$secretKey = 'sdgefgbdbdvberger4564trgdfgdfvcvv';
$api = new SmfRestClient($secretKey);
$api->login_user("master");
$result = $api->get_userInfo();
var_dump($result);
--- End code ---
But result is return NULL...
I want one login form which I was created that login users into my site also SMF forum.
Kindred:
ummm... If I read it correctly, you are doing the exact opposite. You are attempting to get the SMF user data, not set it...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version