Is that possible to add android app to firebase project programmatically using firbase cloud function - firebase

Is there any method to add a android app to exiting firebase project programmatically and i need the google-services.json as result then i need to add sha key with that same app using node-js
online documentation not solve my problem or i don't understand how to do it from that documentation
Thankyou for your answer i flowed it and facing another issue
#admin and #Frank van Puffelen please check
when i try to create android it showing this error.
{ "error": { "code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT" } }
I send post request from live api test window
and in parent i set it as `projects/343202254462`
{ "displayName": "testing", "name": "te4sting", "packageName": "io.asdasd.fdsfdsf", "projectId": "324324324", "appId": "wdeqwe" }

There is a REST api, Firebase Management API, which lets you control the apps connected and other such admin work. Friendly note, make sure you restrict all client api keys from using this api!
REST Resource: v1beta1.projects.androidApps
create POST /v1beta1/{parent=projects/*}/androidApps

Related

Create google chat space using api from postman

\`Hi,
I am trying to create a space in google chat using api. So, for this I have configured OAuth2.0 and following details.Method: spaces.create" post methodHTTP Request: "https://www.googleapis.com/auth/chat.spaces.create"Authorization Scopes: "https://www.googleapis.com/auth/chat.spaces.create"I could able to generate the access token but I am not sure about request body however I configured as follows:
*{
"name": "POC Test SPACE",
"spaceType": "DIRECT_MESSAGE",
"singleUserBotDm": "false",
"threaded": "false",
"displayName": ""
}
For this the response as follows:
"error": {
"code": 404,
"message": "Method not found.",
"status": "NOT_FOUND"
}
Actually our requirement is to send notifications on google chat using gmail id in place of sending emails.
Can anyone please suggest where/what I am missing or do I need to do in another way !!!
Regards,
Vamshi.
per this article you have to be a member of the developer preview program to have access to this feature.
https://developers.googleblog.com/2022/05/Create%20Spaces%20and%20Add%20Members%20with%20the%20Google%20Chat%20API.html

Firebase Log-in events

I want to see Who and When login to the Firebase from UI side, as administrator.
It is not related data access from app etc.
So, I login to https://firebase.google.com/ as User/Manager/Admin and want to see it in logs.
It should be in GCP project related to firebase, if so how can I find it - did saw in Log explorer.
Or it should be in Firebase UI?
thank you in advance.
I would give you a workaround. You can use Firebase Management API which is in beta.
Consider you have to watch a project.
You can make a request like below to get the Project Details.
GET https://firebase.googleapis.com/v1beta1/projects/{YourProjectID}
Sample Response:
{
"projectId": "*****************",
"projectNumber": "*****************",
"displayName": "Sample App",
"name": "projects/*****************",
"resources": {
"hostingSite": "*****************",
"realtimeDatabaseInstance": "*****************"
},
"state": "ACTIVE",
"etag": "1_d15ff4d3-727e-431c-8eba-f33957805f23"
}
In the response, you have a key called ETAG. Basically, this changes whenever the project is opened by someone.
You cannot get who is logged-in or other details.
You can only know someone has opened, changed or made some operations in the project, using ETAG.
You can simply store the ETAG in your server and poll for the change.
If it is changed, then someone might have used the Project.
If you want the Updated Time of the project along with it, you can try this,
https://cloud.google.com/resource-manager/reference/rest/v3/projects/get

Mesibo Dashboard becomes inaccessible after API call fail

I am trying to create a new user through the backend.
My backend is a spring-boot application Java-based.
The API call end with a JSON object and have the result key set to false, with no other information to understand why the user has not been created. And then, when I tried to refresh the Mesibo dashboard, I got an empty page, with errors in the browser console.
This the user I try to save in Mesibo.
{
"op": "useradd",
"token": "I put here my app token",
"user": {
"address": "newuser#email.com",
"name": "User Name",
"token": {
"appid": "com.fake.id"
}
}
}
The image shows what I see in the browser console when I try to access It.
mesibo browser console
It is important to note, that the account I use is not mine, I use the one my company gave me.
We are trying to implement our flow, so we are not in prod we are just testing APIs and others...
Thank you very much for your help!
Anas
PS: I created my own account on mesibo and got the same result!

Firebase Cloud Messaging tokens stop working - 404 NOT FOUND

We have a problem where Firebase Cloud Messaging tokens seem to have stopped working. We register with Firebase when the application first starts-up and then we call an API to store the token on our server.
We upgraded the app last night and checked that a sample of devices successfully registered themselves and that we could send messages.
Today, however, some calls to Firebase from our server are returning:
{
"error": {
"code": 404,
"message": "Requested entity was not found.",
"status": "NOT_FOUND",
"details": [
{
"#type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "UNREGISTERED"
}
]
}
}
These calls are using the same tokens as last night. Half are working and half not.
We don't have any code that explicitly unregisters our app. What else might have caused this issue?
The app is written in C#/Xamarin and we're using CrossGeek's plugin for Firebase.
Thanks,
J.

Meteor Google Calendar Push notification "Unauthorized WebHook callback channel"

I want to use google calendar notification.
I have deployed my Meteor application to
https://google-push-notification.meteor.com
I have verified the url in google web master.
Added the same domain to Domain Verification of Google Console.
I have created Meteor rest api of https://google-push-notification.meteor.com/api/articles for get and post method both.
Below is the postman collection of apis. https://www.getpostman.com/collections/106be7c94d35fcbdb0f8
Post https://www.googleapis.com/calendar/v3/calendars/abc#gmail.com/events/watch
Authorization: Bearer ya29.YwJdqjlSv8Tkl5MEJgiVXQPGxE24ZfITuf8gt0C8DO_VHDvB_1mRAgpAx64R6Wpw8I6fiw
Content-Type: application/json
{
"id": "ya29.XwI-RJ54rS3dbRHgak8V_iTuV7uAWJoZfRFnUE76uCIIUbw4eILPsdEME56Jm5_EfDtWWWs",
"type": "web_hook",
"address": "https://google-push-notification.meteor.com/api/items"
}
I am getting the following response
{
"error": {
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://google-push-notification.meteor.com/api/articles"
}
],
"code": 401,
"message": "Unauthorized WebHook callback channel: https://google-push-notification.meteor.com/api/articles"
}
}
Why am I getting push.webhookUrlUnauthorized response even when I have verified my site in google and added the same domain in google console.
Can anyone please help us to solve the issue
According to the google forum, make sure you have validate the following items below:
Please make sure to follow the steps to correctly verify that the domain indeed belongs to you here: https://support.google.com/webmasters/answer/35179
It must be a https endpoint and the same endpoint must also be present in the developer console as per instructions here: https://developers.google.com/google-apps/calendar/v3/push#registering
Hope this resolve your issue. Cheers!

Resources