towfiqi / serpbear

Search Engine Position Rank Tracking App
https://docs.serpbear.com/
MIT License
1.45k stars 145 forks source link

Error Google Search Console Api #232

Open IvanJRCH opened 4 months ago

IvanJRCH commented 4 months ago

Hello, great project, I have read the tutorial and followed it to the letter: https://docs.serpbear.com/miscellaneous/integrate-google-search-console

but I get these errors: where it says domain.com my domain appears

[start] [ERROR] Search Console API Error for domain.com (3days) : Forbidden. undefined [start] [ERROR] Search Console API Error for domain.com (7days) : Forbidden. undefined [start] [ERROR] Search Console API Error for domain.com (30days) : Forbidden. undefined [start] [ERROR] Search Console API Error for domain.com (30days) : Forbidden. undefined

I am using SerpBear locally

nenosw commented 3 months ago

Im using Serpbear on a server and have a similar problem. When trying to save the private key for google search console i get error message: Forbidden. undefined

theoricher commented 3 months ago

Hello, I suspect the integration with search console is broken. I have the same error as you or the isue error #228

mrj0 commented 3 months ago

I ran into this as well because I missed the step to enable the search console API.

Try this url: https://console.cloud.google.com/apis/api/searchconsole.googleapis.com/metrics

(Make sure the correct project is selected, I trimmed ?project=myproject but it seems to open correctly.)

theoricher commented 3 months ago

I ran into this as well because I missed the step to enable the search console API.

Try this url: https://console.cloud.google.com/apis/api/searchconsole.googleapis.com/metrics

(Make sure the correct project is selected, I trimmed ?project=myproject but it seems to open correctly.)

Thanks @mrj0 it's work for me !

IncreaseWebDev commented 3 months ago

I tried the other fixes, none worked for most accounts, only 2 worked out of all my search console projects.

I kept looking at the differences, and saw that the console sites that were not working were listed as "https://domain.com" and the ones that were working were listed as "domain.com"

I have added the new search console properties as "domain.com", and received no errors when retrieving the results within the console - however I am now waiting for the search console properties to be updated within a day or two - from which I can actually see the search console keywords and insights.

I will try to update this, but it's most likely fixed as I was getting the same error as OP.

It's most likely how SerpBear gets the results from the search console property within the API. It probably just doesn't have a way to recognize the URL strings when they have https:// in front. @towfiqi

IncreaseWebDev commented 3 months ago

So I have two installations going. I fixed the issue after adding a new google search console property without https:// in front of it.

One serp bear installation has the domain as www.domain.com and the other is domain.com

The one with domain.com works, the other with www. doesn't.

Now... these installations are two different environments; one on a VPS with docker accessed by a subdomain, and one on pikapods.

Hopefully this helps someone!

@towfiqi

OlliZabal commented 2 months ago

So I have two installations going. I fixed the issue after adding a new google search console property without https:// in front of it.

One serp bear installation has the domain as www.domain.com and the other is domain.com

The one with domain.com works, the other with www. doesn't.

Now... these installations are two different environments; one on a VPS with docker accessed by a subdomain, and one on pikapods.

Hopefully this helps someone!

@towfiqi

@towfiqi I can confirm this with a docker installation setup. Had to change the property to a "domain" setup within the Google Search Console. As @IncreaseWebDev described, then it also worked for me.

ingeniumdesign commented 6 days ago

same error now, after update the new version.