I followed Magento Doc and created checklogin.php, endpoint.php, login.php and OauthClient.php.
As the doc says in checklogin.php, there is
$credentials = new \OAuth\Common\Consumer\Credentials($consumerKey, $consumerSecret, $magentoBaseUrl);
$oAuthClient = new OauthClient($credentials);
When I try to activate API Integration, It is giving error:
Fatal error: Uncaught Error: Class 'OauthClient' not found in /public_html/magento2/checklogin.php:22 Stack trace: #0 {main} thrown in /public_html/magento2/checklogin.php on line 22
Where should I place the OauthClient.php file?