Can't recieve information from my blogger site using a Get request and v3 API - api

When I do an GET to the test google site in the docs the blogger documentation the request works fine.
When I do a GET to my personal site I get this error:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
Working:
https://www.googleapis.com/blogger/v3/blogs/2399953?key=AIzaSyA-6DkaL7Ff_U5Xwm4c_0XoCA_I4G1E24U
Non working:
https://www.googleapis.com/blogger/v3/blogs/657661307303?key=AIzaSyA-6DkaL7Ff_U5Xwm4c_0XoCA_I4G1E24U
I DO have the blogger v3 API enabled. My key is working as shown above. My blog is set to public and can be viewed here:
http://mutant1098.blogspot.com/
Also I see the failed requests coming into my bloggers dashboard.
I don't understand what the issue is. Why is it working on google bloggers main site but not my personal site.
I scoured the API dashboard for any permissions issues but couldn't find any that looked like the problem.
Thanks in advance for any guidance. This looks like a great platform just wish it was either easier or better documented.

Your blog ID must be incorrect, because the call to getByUrl works:
https://www.googleapis.com/blogger/v3/blogs/byurl?url=http%3A%2F%2Fmutant1098.blogspot.ca%2F&key=AIzaSyA-6DkaL7Ff_U5Xwm4c_0XoCA_I4G1E24U

Related

Google Page Speed Insights API: Internet Error

I am getting an error from Google PageSpeed Insights API. Its just returns Internal Error with Code 500.
Here is the detailed response:
"error": {
"errors": [
{
"domain": "global",
"reason": "internalError",
"message": "An error occurred while fetching or analyzing the page."
}
],
"code": 500,
"message": "An error occurred while fetching or analyzing the page."
}
}
I also Tried with Google API key from within Google Cloud Console (Enabled
PageInsights APi for my account). No Luck still the same message.
Here is a result screenshot of the same page tested on tools.pingdom.com
It would be helpful if Google Provided detailed error messages which can help us identify where the issue is. Any help or pointers on this would be great.
The issue was with an SVG image. Once it was removed Page Speed starting working. Still not sure what was wrong with the image.
You have too many resources loading on page load. The Render limit is 200.
You can also try to test your site with think with Google

authenticate to Google Computer Engine instance using CLI

I've set up a Google Compute Engine Instance and I want to be able to turn it on and off using a script on my home computer. I see that there's an API that lets me do that by sending a POST request like this:
curl --data '' https://www.googleapis.com/compute/v1/projects/my-project/zones/asia-east1-a/instances/my-instance/stop
but the response I get from that is this:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
So I'm trying to see how I can allow my script authorisation to use the API on the compute engine without having user interaction. How do I do this?
It looks like Google requires OAuth 2.0 authentication, but it seems really complex.
The closest thing I can find in Google's docs is this page but I can't work out how to make it a bunch of curl statements.
This SO thread gets closer, but glancing over the scripts there - it looks like they need user interaction.
I think you need Application Default Credentials. Have you seen this page?
https://developers.google.com/identity/protocols/application-default-credentials

Google Custom search API returning Access Not Configured

We are calling API by url:
https://www.googleapis.com/customsearch/v1?key=MY_KEY&cx=CUSTOM_SEARCH_ID&q=flower
getting error in reponse:
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
WE have enabled Custom Search API and Google + API. Still getting above error. Should we needto enable some other API too?
Please help.
(I'm repeating here the answer I gave you here).
No, I believe that custom search API is the only API that you need to enable.
So, I would consider whether you have the right key and CSE ID.
To verify your CSE ID, do a test query from here (fill in ):
https://console.developers.google.com/project/PROJECT_ID/apiui/api/customsearch/method/search.cse.list
If your query works there, but still doesn't work in your code, then perhaps the issue is your key. If you are just doing a simple URL request (as you show in your Q), then I would expect you are using a server key. And, of course, the key you are using must be from the same project where you have enabled the CSE API.

Google plus API Issues

Working with Google Plus API, I have enabled the google+ api in developer console and regenrated the appkey multiple times and trying to access the profile using profile.get but everytime i am getting the following issue:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
Here is the link, i am trying to do:
https://www.googleapis.com/plus/v1/people/113377691202864347297?key={myKey}
passing my generated key for that domain, i am getting the above error. why it is not working
Screenshot of Enabled API's
I am guessing you're using the wrong API key. The API key is not a client ID or a client secret - it shouldn't have '.' in it. In the new console (https://developers.google.com/console) they are generated under the Credentials > Public API Access section and should look something like 'AIzaSyC-iPgOiU2hSqnpjc-KrtHpwThsWh_hQdO'.
If you've made one make sure that the allowable IP addresses or browser URLs (depending on key type) include the one you're making the call from. I included a screenshot of the key section below.
Which jar should i include for retrieving public posts of user.
Iam using google+ v1 api jars but there seems to be some problem with json. It is not able to resolve it.

Authentication error in google shopping search API

I want to use Google Shopping Search API for products search. I have followed all the steps stated in document. First I created a google account, then went to GOOGLE APIs console to create a project and got an API key. I want to use this service as publishers in the Google Affiliate Network who can use the API to access product offers from their advertisers of choice.
Then I signed up at google affliate network to get pid. Then I send request to some advertisers to join their program from my affiliate admin panel. Now I have one advertiser approved. Now on this document, it states that to request feed to access products from google affiliate network advertisers of publisher I have to use the following url
https://www.googleapis.com/shopping/search/v1/source/products
Where source in the url is replaced by gan:mypublisherid after putting this my url looks like
https://www.googleapis.com/shopping/search/v1/gan:myid/products?key=mykey&country=US
But When I access this url i found following json error
{
"error": {
"errors": [
{
"domain": "global",
"reason": "conditionNotMet",
"message": "authentication is required for GAN",
"locationType": "header",
"location": "If-Match"
}
],
"code": 412,
"message": "authentication is required for GAN"
}
}
Now my question is how to get authenticated? Is my url is correct or there is some thing other way to do this?
Best Regards.
Read this article. The last part i.e. authentication.
You have to get an access token before using the API. You can either use OAuth or Client Login token. To get a token using Client login you can use cURL. Remember to put servicetype as shoppingapi as the document says.