WhatsApp cloud API is working in testing but how to use for production? - whatsapp

I already created permanent token but it's only able to send messages on testing numbers.
Is there any other configuration required before i use it for production and send messages to my customers ?

Related

Sveltekit how to call an api with a token

I currently have an API running on Nodejs Express where you can get or upload all types of files (images, videos...) as well as simple json responses.
I would like to connect Sveltekit to this API but it is secured with a SSO so I need to provide an access token for each request.
I already get the access token from the SSO (oidc) on sveltekit.
Solution 1:
a service workers intercept requests to the API and add the access token.
Problems: I don't want to build every time but as the documentation says: service workers only work in the production build, not in development
Solution 2:
send requests to the svletekit backend and then pipe them to the API with the access token
Problems: Works only for basic requests but not for stream, it seems that it is supported recently (https://github.com/sveltejs/kit/issues/5344) but there is no documentation or example and this solution requires more resources (requests should be from the browser to the api)
Solution 3:
Hooks externalFetch
This function allows you to modify (or replace) a fetch request for an external resource that happens inside a load function that runs on the server (or during pre-rendering).
Problems: It doesn't work for requests like the src of an image
Any idea ?
edit: Solution, with the new version of sveltekit node-fetch has been replaced by Undici and the streams are functional, so it is possible to pipe requests from the backend.
For the dev it work well but it's not the best solution for production so you can use both depending on the environnement.

FCM get registration token via robot framework

I want to get generated registration token which generated by a client such as (Web JS, Android/IOS App...) via robot todo automation testing
I'm thinking to use mountebank to add JS SDK but not simple because related to grant notification permission issue (It's required to able to generate registration token)
Anybody have an idea to get that token via robot please share
Thanks in advance!!!
What is FCM?
Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost.
Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user re-engagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.
Using deprecated Google Cloud Messaging APIs? Learn more about how to migrate to FCM.
https://firebase.google.com/docs/cloud-messaging

[teams]How to update messaging endpoint via API or SDK?

I am working on a chatbot in NodeJs and we are using Ngrok to establish a tunnel, the problem we have for teams is that every time we relaunch Ngrok we get a diferent url so i have to manually change the messaging endpoint on the botframework website(under settings)
Is there a way to do this via the api? or maybe the SDK?
This was not an issue for other chat platforms but for Teams i cannot find this feature.
Claudiu
Unlike some other chat/bot platforms, Bot Framework (and therefore Teams) works by having the chat service initiate the connection to the bot instead of the other way around. That's why every bot requires an https: endpoint.
Ngrok is one way to do it without running the bot in the cloud, but as you note those temporary URLs only last 7 hours. You can purchase the premium version of Ngrok which lets you have static subdomains - for example at our Build conference I used https://build2018.ngrok.io.
One of our developers also created Tunnel Relay which you can download. The utility itself is free but you have to have an Azure subscription and use Azure Service Bus - which at the basic tier is $0.05 per million transactions. All the details, including a download link, are on the GitHub page linked above.
There is no public API for changing your bot's messaging endpoint. (If there were, it would be a great way to steal the traffic from other bots.)

Sending Push Notification To All People Who Have Enabled Notifications For My Progressive Web App

I am in the process of developing a new site and have decided to add progressive web app capabilities to the site. I have set it all up correctly and I can send push notifications to devices with whom I know the endpoint via FCM with a cURL command.
My question is how do you send one to all users who have enabled notifications on my site without knowing a list of all users unique endpoints.
If you are using the Firebase Cloud Messaging Web SDK you should be able to get the Firebase token and subscribe that token a topic using the server side API and then you can message the topic.
NOTE: This requires the use of the Firebase Web SDK to work. This is not supported with the raw Web Push API.

Google Cloud Messaging token

I'd like to know if each time my application runs I need to get the token and pass it to the server, or if it's only necessary once to register the application. Thanks a lot.
You need a token to register the GCM(push notification) to the Google Server. Then this token is passed and used in the server to send subsequent notification. This token should be persisted by the server so that it can be used to make API calls to the Google server. With this approach, your server and the Android device do not need to create a persistent connection and the responsibility of queuing and relaying messages is all handled by Google's servers.
For more information visit the Registering Client Apps and also check this documentation.