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?

1 Answer 1


You can place the OauthClient.php along with the other three files in your application.

You just have to add the following line in your checklogin.php

require 'OauthClient.php';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.