Method: verifyToken

This method allows to verify if authentication is alive.

Authentication

This method does not require authentication.

HTTP method

This method is called with HTTP method GET.

Arguments

Argument Type Element (array) Valid Values Default Value Detail
token string   authenticated session id (stored in the session $_SESSION['token']) required User Token

Returned Values

Element (path) Name Type Description
/ islogged string true/false

Example Query

	GET http://testapi.wannaprint.com/Rest/1/[API Key]/api/verifyToken/token=[token]

PHP call of method:
	<?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!";
		}
	?>
   			

Example Response

	{
		"islogged": "true/false"
	}
   			

Error Codes

001: Wrong API Key
The API key is wrong or missing.
002: Failed to parse request
The request could not be parsed.
011: Controller is invalid.
The controller passed is not valid.
031: Invalid Method
This method does not exist in the method list.