nahid / envato-php

PHP client for envato API
30 stars 13 forks source link

"Undefined property: GuzzleHttp\Psr7\Response::$data" #3

Open ghost opened 5 years ago

ghost commented 5 years ago

I m using laravel 5.7 in my localhost. when i will install this package step by step. after setup set all require configuration. when i run my project in localhost following error will occur

"Undefined property: GuzzleHttp\Psr7\Response::$data"

ghost commented 5 years ago

its my code in my controller NOTE: credential not included laravel version : 5.7

use Nahid\EnvatoPHP\Envato;

public function EnvatoData() {
$config = [ "client_id" => '',
'client_secret' => '',
"redirect_uri" => '',
'use_personal_token' => FALSE, 'personal_token' => '',
'app_name' => '', ];

    $envato = new Envato($config);
    $envato->getAuthUrl();

    $user = $envato->me()->accounts();
    dd($user->data);  

    return view('envato_signin');
}
kaankilic commented 5 years ago

this means that your request is unauthenticated. you have to config your api to connect via OAuth on Envato api as you can see de response of $user variable. The package works perfectly with Laravel 5.7 as I tested on my app.

ghost commented 5 years ago

this means that your request is unauthenticated. you have to config your api to connect via OAuth on Envato api as you can see de response of $user variable. The package works perfectly with Laravel 5.7 as I tested on my app.

first off all thank you so much for faithful reply me. can you give me installation steps for configure this api as per you config on your app with OAuth

ghost commented 5 years ago

this means that your request is unauthenticated. you have to config your api to connect via OAuth on Envato api as you can see de response of $user variable. The package works perfectly with Laravel 5.7 as I tested on my app.

Thnx man...Now it work perfectly........