This method does not require authentication.
This method is called with HTTP method GET.
| Argument | Type | Element (array) | Valid Values | Default Value | Detail |
|---|---|---|---|---|---|
token |
string | authenticated session id (stored in the session $_SESSION['token']) | required | User Token |
| Element (path) | Name | Type | Description |
|---|---|---|---|
| / | islogged | string | true/false |
GET http://testapi.wannaprint.com/Rest/1/[API Key]/api/verifyToken/token=[token]
<?php
session_start();
$api_items = $apicaller->sendRequest(array(
'controller' => 'api',
'action' => 'verifyToken',
'token' => $_SESSION['token']
));
if($api_items ->islogged == 'true' )
{
echo "You are logged!";
}else
{
echo "You are not logged!";
}
?>
{
"islogged": "true/false"
}
001: Wrong API Key002: Failed to parse request011: Controller is invalid.031: Invalid Method