Cumulocity: Adding binaries to microservices ERROR - microservices

When I try to upload the zip file of the microservice, I get as a response:
{
"error": "applications/Bad Request",
"info": "https://www.cumulocity.com/guides/reference-guide/#error_reporting",
"message": "Supported only for hosted applications"
}
But how can a microservice be a hosted application?
Indeed in the configuration step, it is asked to put
"type":"MICROSERVICE"
as described here (https://cumulocity.com/guides/microservice-sdk/rest/).

Related

Tag Manager Client API: Unable to access Tag Manager content with API key

I would like to connect to the Tag Manager Client API to access some content in a container without having to log in.
This page mentions at the top that it "Requires authorization". However, I am using the contents of a container to store ad urls and the users of the website I'm working on shouldn't be asked to log in to Google for this.
What also makes me confused is that the "Try this API" UI let's me choose Credentials using:
Google OAuth 2.0
or API key
However, when I select "API key", I get a 401 error with the message: "Login Required".
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
Thanks
The "test this API" interface presents you with a choice that is not actually applicable.
The API documentation for the GTM API is quite unambiguous:
Your application must use OAuth 2.0 to authorize requests. No other
authorization protocols are supported. If your application uses Google
Sign-In, some aspects of authorization are handled for you.
So the problem seems to be that the "try this API" has a generic UI that gives you options that are not actually valid for each of the APIs where it shows up.

Google API - Google Play Services - Error 500 Message:Null

Request URL:
https://content.googleapis.com/games/v1/players/[CORRECT_PLAYER_ID]?access_token=[CORRECT_APPLICATION_ACCESS_TOKEN]
The application is Server and set up like here:
https://developers.google.com/identity/protocols/OAuth2ServiceAccount
The only response is:
{
"error": {
"code": 500,
"message": null
}
}
In API Explorer I have:
...
"code": 401,
"message": "User has not completed registration."
...
What is wrong with my use case? How I can workaround Verification of Google Play Services User ID?
A 500 response is a server-side error, which sounds more like a bug than a question. It looks like they have a place to report bugs here.
I think this might not execute through the APIs Explorer this way because you haven't registered your project with the credentials being used; it doesn't currently have a way to use your own credentials instead.

Google G Suite Business Reports API configuration

I'm trying to configure Google Service Account (in developers console) to use it in my application to get Reports API.
I'm getting error - "Access denied. You are not authorized to read activity records". It seems some issue with configuration.
I created new Project and Service Account in Google Developers Console. Added Client ID in Admin Console Settings Manage API client access menu.
Maybe I missed something?
Please, help.
Server response is:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Access denied. You are not authorized to read activity records.",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Access denied. You are not authorized to read activity records."
}
}
You can try to call the .setServiceAccountUser("admins email address") as per described in this SO post if you haven't done yet.

projects.getiampolicy (cloudresource manager api)

Utilizing the cloud resource api, specifically projects.getIamPolicy Running this for projects I own returns the following:
"error": { "code": 403, "message": "The caller does not have
permission", "status": "PERMISSION_DENIED
I have enabled the Cloud Resource Manager API with no success. I can successfully run the gcloud sdk command "projects get-iam-policy projectID" however the API errors out in the API Explorer as well as via Python.
Any help?

pageSpeedOnline.pagespeedapi().runpagespeed(..) function fails with error 403

I have tried to analyze url page using pageSpeedOnline.pagespeedapi().runpagespeed(..) api but fails with 403 "Forbidden". The api is enabled in the console and the billing is also enabled but I am blocked further since it always fails with 403. The billing was just enabled since a week back.
Below is the response of the curl request,
curl "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=http://code.google.com/speed/page-speed/&key=API_KEY"
{
"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."
}
}
Please help.
I got it resolved, by creating "Key for browser apps (with referers)" and used that API key in the project.

Resources