get HTTP response code 403 when calling Google People API - google-people-api

I used to list and download the contacts in Google Workspace using the People API. But just several days ago, Google starts to respond the error messages as below. We assume the error may be caused when the IP address is blocked but still not sure what 's going on there:(
google.People.ContactGroups.List() failed: got HTTP response code 403 with body: <!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 403 (Forbidden)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>403.</b> <ins>That’s an error.</ins>
<p>Your client does not have permission to get URL <code>/v1/contactGroups</code> from this server. <ins>That’s all we know.</ins>

Related

Indicate whether to send a cookie in a cross-site request by specifying it's SameSite attribute -youtube Vide - simpliest page ever, can't find aswer

Do you know why I have tons of this problems? It's doing to me in most simply page what can be? Can you send me peace of code?
Specify SameSite=None and Secure is interesting advise but where to write?
The video is there but the issues...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<iframe width="560" height="315" src="https://www.youtube.com/embed/P3ZrN-m7VJA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</body>
</html>

google cloud static hosting only shows html, but no website

i want to host a single page on google cloud. only index.html. html is validated, but only the source code is shown under the link, no website.
inserted some other test html pages which work on google cloud (copied source code) but i get only html shown under Link.
what am i missing?
TLDR: Your link, in fact, displays HTML, but the content of the HTML page is a HTML source.
When I open the link you provided - https://storage.googleapis.com/fronteris-makler-gmbh/Immobilienmakler-regensburg/index.html ` I see the following:
<!DOCTYPE html>
<html>
<head>
<title>Immobilienmakler in regensburg - FRONTERIS MAKLER Gmbh</title>
<head>
But when I display the page source I see:
view-source:https://storage.googleapis.com/fronteris-makler-gmbh/Immobilienmakler-regensburg/index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1671.5">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px 'Courier New'; color: #0000c2; background-color: #ffffff}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px 'Courier New'; color: #0000c2; -webkit-text-stroke: #0000c2; background-color: #ffffff}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px 'Courier New'; color: #0000c2; -webkit-text-stroke: #0000c2; background-color: #ffffff; min-height: 17.0px}
span.s1 {font-kerning: none}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><span class="s1"><!DOCTYPE html></span></p>
<p class="p2"><span class="s1"><html></span></p>
<p class="p2"><span class="s1"><head></span></p>
<p class="p2"><span class="s1"><title>Immobilienmakler in regensburg - FRONTERIS MAKLER Gmbh</title></span></p>
See the last line for example - it's your page title html encoded. I have no idea how you did achieve it, but you stored the html source as html file type and it was re-encoded as html. What kind of editor did you use? This would happen for example if you created your page in word and then stored it as .html type. Do you use some programming editor? At least Notepad++ or Atom, TextMate or whatever platform you do use.

GCP composer environment settings - source bucket

I am trying to set a cloud composer environment gcs source bucket variable.
gcloud composer environments run airflow-composer-project --location us-west1 variables -- --set gcs_source_bucket gs://catalog_image_bucket
The error says it is a temporary error but it maybe with my syntax.
ERROR: (gcloud.composer.environments.run) HTTPError 502: <!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 502 (Server Error)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/ro
bot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{
background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelog
o_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.c
om/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>502.</b> <ins>That’s an error.</ins>
<p>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds. <ins>That’s all we know.</ins>
To update a variable you need to use the update command:
gcloud composer environments update
The run command is to run Airflow sub-commands

AWS lex gives HTTP 500 error on calling lambda function as validation code hook

As the question says, I am getting a 500 error on the AWS lex chat terminal when using a lambda function as a validation codeHook. The lambda function is working and tested with a lex event and also the chatbot is working as expected and returning the slot values when not using a lambda function.
This is the exact error message given by lex
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>Page Error</title>
<style>
body {
font: 13px/ 1.231 verdana, arial, helvetica, clean, sans-serif;
}
h1,
.h1 {
color: #E47911;
font-size: 170%;
font-weight: normal;
margin: 1.5em 0 1em;
padding: 0;
}
#errorPage {
text-align: center;
margin-top: 44px;
margin-bottom: 57px;
}
#errorPage h1 {
margin: 12px 0;
}
#errorPage p {
line-height: 1.7em;
}
</style>
</head>
<body>
<div id="errorPage"><img src="https://images-na.ssl-images-amazon.com/images/G/01/webservices/console/500._V170950309_.gif" width="392" height="202"
alt="500" />
<h1>We're sorry!</h1>
<p>An error occurred when we tried to process your request. <br /> Rest assured, we're working to resolve the problem as
soon as possible. We apologize for the inconvenience. <br /> Click here to visit our home page</p>
</div>
</body>
</html>

Rest Webservice hosted in WAS return HTML for error status codes

we are hosting rest based webservices on WAS 8.0. The issue is when we return a error status code with a message, server is adding its own HTML response and then my plain text message. Any idea on how to disable WAS server adding its own HTML
ex.
when I return
Response getEntity(String entityId){
...
...
...
return Response.status(Status.NOT_FOUND).entity("Entity you are searching for is not found").type(MediaType.TEXT_PLAIN).build();
}
the response I get is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>404 - File or directory not found.</h2>
<h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
</fieldset></div>
</div>
</body>
</html>
Entity you are searching for is not found
any configuration settings I must do in WAS server to avoid the HTML?
Thanks and Regards
The solution was, we were accessing webervice in was via a IIS Server (reverse proxy) the HTML was getting added by the IIS not WAS. Follow instructions at https://blogs.msdn.microsoft.com/webdevelopertips/2009/08/24/tip-93-did-you-know-php-and-custom-error-pages-configuration/ and the issue got resolved.