How does backend configuration for push notification to android & iOS flutter platform works. Does it uses simple curL calls. Then from where backend gets the fcm_token generated inside the app(android/iOS). If possible explain backend setup too.
Each language has a different method or packages for that , you do not need to use the curl statement for your android and ios configuration if you are using a backend.
i am getting this error Unhandled Exception: Failed to obtain access credentials. Error: invalid_grant Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values in the JWT claim. Status code: 400
i am getting the above two statements on terminal successfully but aren't receiving the notification on device screen. Can you please help me in that? I/flutter (29003): FCM message sent successfully D/FLTFireMsgReceiver(29003): broadcast received for message
To obtain the client_id and client_secret: Navigate to the Google Cloud Console, access the service account section, and generate a key. The JSON file will contain the necessary client_id and client_secret. To get the bearer token in Postman follow these steps: 1. Utilize Google OAuth Playground to authorize API access by Entering your OAuth client ID and client secret (obtained from Google Cloud Console). 2. Specify your desired scopes for Firebase Cloud Messaging (FCM) by accessing this URL: www.googleapis.com/auth/firebase.messaging 3. Click on "Authorize APIs" and go through the authorization process. Exchange the authorization code for tokens. The access token serves as your Bearer token.
I got the error: "DartError: Failed to exchange authorization code. Invalid server response." After checking, I found that the program could not run over the following: Client client = await auth.clientViaServiceAccount( auth.ServiceAccountCredentials.fromJson(serviceAccountJson), scopes ); How to fix?
Create Scopes for which you want to allow the authorization when using the access token. Create a client using your JSON file by HTTP package and use the googleapis package to get credentials by sending client, scopes and ServiceAccountCredentials from the json file. You will get accessToken in the credentials.
how can i contact you? i want to ask many things im working on a live project , and want to enable notifications but this access token expires , also i want to know how send notifications to multiple users and how to automate the regeneration of access token and send it to url ?? HELP ME PLEASE!!!!!!!!!!!!!!!!
Its because it's a temporary token. If You are using a backend depend on that backend there are ways to create a token with an expiration date and time.
thank you, great tutorial!
You're such a savior thank youuuu
dude, seriously, thank you so soo soooo much, can't figure this out for a couple of days now and almost gave up. literally a life saver
Glad I could help!
Hey, Thank you soooo much, you saved my day:)
You are welcome!
You are a life saver thank you so much
Thank you you save my life
Wonderful. Thank you
thanks a lot you save my day (:
How does backend configuration for push notification to android & iOS flutter platform works. Does it uses simple curL calls. Then from where backend gets the fcm_token generated inside the app(android/iOS). If possible explain backend setup too.
Each language has a different method or packages for that , you do not need to use the curl statement for your android and ios configuration if you are using a backend.
i am getting this error
Unhandled Exception: Failed to obtain access credentials. Error: invalid_grant Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values in the JWT claim. Status code: 400
Check the grant values you are adding if you are not adding anything add exp anf iat for your token in the function for generation token
Thanks a lot for this beautiful video.
is this work on both android or ios or for ios we need some changes
for receive message
i am getting the above two statements on terminal successfully but aren't receiving the notification on device screen. Can you please help me in that?
I/flutter (29003): FCM message sent successfully
D/FLTFireMsgReceiver(29003): broadcast received for message
The firebase push notification is only shown for background notification for foreground notification you need to customize toast or alert.
thank you soo much
plz do this in dio
dio interceptors whats the difference?
Ok
Why there is no video of sign in with apple in you channel
you don't know how to do?
th-cam.com/video/IQdnE0qIxNk/w-d-xo.htmlsi=k-kFfjVGB79_h-R_
make a second part of it,, also use laravel backend to send etc
Will work on it soon.
where to get client_id and client_secret by using post man
To obtain the client_id and client_secret:
Navigate to the Google Cloud Console, access the service account section, and generate a key. The JSON file will contain the necessary client_id and client_secret.
To get the bearer token in Postman follow these steps:
1. Utilize Google OAuth Playground to authorize API access by Entering your OAuth client ID and client secret (obtained from Google Cloud Console).
2. Specify your desired scopes for Firebase Cloud Messaging (FCM) by accessing this URL: www.googleapis.com/auth/firebase.messaging
3. Click on "Authorize APIs" and go through the authorization process.
Exchange the authorization code for tokens.
The access token serves as your Bearer token.
I got the error: "DartError: Failed to exchange authorization code. Invalid server response."
After checking, I found that the program could not run over the following:
Client client = await auth.clientViaServiceAccount(
auth.ServiceAccountCredentials.fromJson(serviceAccountJson),
scopes
);
How to fix?
Failed to send FCM message: 404
Check your permissions once more
thanks sir
You have not provided any link or ref of the code you copy pested. Sad!
Check the description
please give me a source code
Added in the description
Not so explanatory 😢😢
I'm sorry to hear that! If you provide more context or clarify what you'd like to know about video comments, I'd be happy to help. 😊
@@CodeMender how can I generate access token please, I already have my service key and json file
Create Scopes for which you want to allow the authorization when using the access token. Create a client using your JSON file by HTTP package and use the googleapis package to get credentials by sending client, scopes and ServiceAccountCredentials from the json file. You will get accessToken in the credentials.
@@CodeMender thanks
how can i contact you? i want to ask many things im working on a live project , and want to enable notifications but this access token expires , also i want to know how send notifications to multiple users and how to automate the regeneration of access token and send it to url ?? HELP ME PLEASE!!!!!!!!!!!!!!!!
Its because it's a temporary token. If You are using a backend depend on that backend there are ways to create a token with an expiration date and time.