schulzefelix / laravel-adwords-targeting-idea-service

Get KeywordIdeas and Search Volumes from AdWords
MIT License
27 stars 8 forks source link

Keeps loading #8

Closed roverdev closed 5 years ago

roverdev commented 5 years ago

I use laravel v5.8.11.

Walked through the steps:

Launched a small code: $keywordIdeas = \AdWords::keywordIdeas('coffee'); dd($keywordIdeas);

Now it says: (1/1) ClientException Client error: POST https://oauth2.googleapis.com/token resulted in a 400 Bad Request response: { "error": "invalid_request", "error_description": "Missing required parameter: refresh_token" }

So created a new one:

Now Page keeps loading and loading and finally returns the same error.

Thanks for the assitance!

schulzefelix commented 5 years ago

Hi,

I pushed a fix that the code will throw the exception early in case of a response code 400 too. Anyway, that doesn't solve your problem, just showing you the error.

I can reproduce the error when my token variable is empty in the .env file:

ADWORDS_CLIENT_REFRESH_TOKEN=

Did you try to refresh the config cache after you copied the token in there?

badrshs commented 5 years ago

I got same issue here , On "laravel/framework": "5.8.*" I did all required steps for client_refresh_token , im not using .env , I past it immediately to(adwords-targeting-idea-service.php)

thanks again for helping