On April 1st the Rank and Index Checkers price will grow by 2 kop. for a keyword on XS Pricing Plan. But for you the price won't change for now!
We've frozen old prices till June 1st for all accounts, active in 2025.
Follow us on Telegram 📧

SDK Topvisor::Session - Topvisor API

Session defines a user that initiates requests.
The session is to be used to create API calls with the Pen object.
During initialization, it takes $auth array as an argument.

Default session

By default, $auth = null.
If $auth isn't specified explicitly, the authorization parameters specified in the config.ini file are to be used.

Session with other parameters

$auth is an array, it should include two elements: userId and accessToken.
Use an API Key as an accessToken. How do I get the API Key.

Examples

Creating a default session (config.php)


	<?php
	//...
	$Session = new TVSession();
	//...


Creating a session for another userId


	<?php
	//...
	$Session_2 = new TVSession(['userId' => $userId, 'accessToken' => $accessToken]);
	//...