pinterest-api-php icon indicating copy to clipboard operation
pinterest-api-php copied to clipboard

getting error message "API method not found"

Open ghost opened this issue 4 years ago • 0 comments

Using this code (using my App id and App secret key and CALLBACK_URL)

    $pinterest = new \DirkGroenen\Pinterest\Pinterest(CLIENT_ID, CLIENT_SECRET);

    if (isset($_GET["code"])) {

        $token = $pinterest->auth->getOAuthToken($_GET["code"]);
        $pinterest->auth->setOAuthToken($token->access_token);

    } else {

        $loginurl = $pinterest->auth->getLoginUrl(CALLBACK_URL,  ['user_accounts:read,boards:read']);
        echo '<a href=' . $loginurl . '>Authorize Pinterest</a>';
        $me = $pinterest->users->me();
        echo $me;

    }

but after click on "Authorize Pinterest" link getting error message- {"code":11,"data":null,"message":"API method not found.","endpoint_name":null,"status":"failure"}

ghost avatar Sep 09 '21 05:09 ghost