Empty referrer in YouTube API requests - http

I'm trying to retrieve a channel's video list from the YouTube API. Actually, this functionality is already implemented, but suddenly stopped working.
Here's what I have:
A GET request to the search endpoint: https://www.googleapis.com/youtube/v3/search;
Some query params:
part=snippet,id
channelId=UCSJ4gkVC6NrvII8umztf0Ow (just an example)
maxResults=5
order=date
key=[MY_API_KEY]
I guess everything's alright, but for some reason I get this response:
{
"error": {
"code": 403,
"message": "Requests from referer <empty> are blocked.",
"errors": [
{
"message": "Requests from referer <empty> are blocked.",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}
I really don't know what's wrong, and every request returns the same error.
Can someone help me please?
Thanks for the attention!

Related

Google Consent API

The samples and documentation for the Cloud Healthcare Consent API need a refresh. For instance, when POST to attributeDefinitions?attributeDefinitionId=requester_identity
with BODY:
{
"description": "what groups are consented for access",
"category": "REQUEST",
"allowedValues": [
"fhirUser"
]
}
{
"error": {
"code": 400,
"message": "attribute definition ID malformed, must match ^[_a-zA-Z][_a-zA-Z0-9]{0,255}$",
"status": "INVALID_ARGUMENT"
}
}
These are the values straight from the documentation.
This was an error on my side. The proxy was dropping the query string parameter. The value in the documentation is correct.

Sending a notification through Firebase's FCM API Test

I'm currently trying to send a notification using the " Try this API " interface of Firebase.
I filled my Request Body with this :
{
"validateOnly": false,
"message": {
"notification": {
"body": "Body",
"title": "Title"
}
}
}
and the RequestParameters with
projects/myprojectid
I didn't check the Google API Key since my project doesn't have one, but I checked the Google OAuth 2.0.
After executing, I get this error :
{
"error": {
"code": 400,
"message": "Recipient of the message is not set.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "message",
"description": "Recipient of the message is not set."
}
]
},
{
"#type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "INVALID_ARGUMENT"
}
]
}
}
After some research, I don't understand what is missing in the request. Are all the parameters mandatory for the request ?
You're not specifying who the message is for, which is what the error message is trying to tell you. You can do by either including a token key with one of more device tokens, or a topic or condition key in the JSON.
Also see the Firebase documentation on building requests to send a message for more information and examples of each of these.

Google Calendar Events Watch 400 pushNotSupportedForRequestedResource

I am trying to subscribe to all user's calendars, but some calendars do not support this functionality.
Request:
POST https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/watch
Response:
{
"error": {
"errors": [
{
"domain": "calendar",
"reason": "pushNotSupportedForRequestedResource",
"message": "Push notifications are not supported by this resource."
}
],
"code": 400,
"message": "Push notifications are not supported by this resource."
}
}
How I can find out whether the current calendar support "watch"?
Does it corresponding to "accessRole" from calendar#calendarListEntry.accessRole

Google Identity Toolkit failing to sign-up new user: Error code: Internal error encountered

New users trying to setup logins that aren't #google.com are hitting issues using Google Identity Toolkit. This has been working fine for a long time so not sure what's up. Looks like this:
In the console seeing a 500 error coming back when calling this URL:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/setAccountInfo?key=<key>
POST data:
{"email":"nlckeweo#sharklasers.com","displayName":"test","password":"password"}
API response:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"errors": [
{
"message": "Internal error encountered.",
"domain": "global",
"reason": "backendError"
}
],
"status": "INTERNAL"
}
}

Adding ACL records for FreeBusyReader

I am trying to add a new ACL record to add a domain as freeBusyReader as described here.
Whenever I POST to
https://www.googleapis.com/calendar/v3/calendars/r...#resource.calendar.google.com/acl with a new domain I receive an error:
# Request
{
"scope": {
"type": "domain",
"value": "domain.com"
},
"role": "freeBusyReader"
}
# Reply
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
Weirdly though, it works for domains for which there is already some ACL rule. Those I can even change, so I assume that neither existence of the resource nor authorization is not the problem as suggested in the docs.
You can check this documentation about How to update the ACL of a Google Calendar with the Google APIs Explorer. If the user you want to grant access to is included in the response, you can proceed to update the ACL of the calendar.
For more info:
Working with ACl in Google Calendar

Resources