How to setup wechat mini program push message service? - wechat

I need to send service alerts to wechat mini app users.
I have been trying to setup it for wechat mini app but some how not able to get exact document to integrate service or I am missing something somewhere.I have been following this document link.
https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/message-push.html#option-url
But they are asking for Token which I do not know to get.
Please someone help me to solve this problem.
Thank you in advance.
https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/template-message.html
I tried above thing but it is not suitable for my requirement.

In your question,there are following parts:
mini program user
your wechat mini program
wechat server
your own backend server
I suppose that you want to send messages to mini program user ,not receive messages from wechat server. The first link you give describes how to receive messages from wechat server. so it is not what you want.you provide the address and token to wechat server,and they can use the token to sign the request and you can verify the requsest if it is from wechat server.so the token you provide can be any valid string.you don't need to get it from somewhere
Second link is right ,and you can check this link to get the rest api address and request parameters.you must use your https backend server to request wechat rest api.

Related

Wechat Mini Porgram Push Notification

Hi Recently I came to know about wechat mini program but as material is very less so I am unable to differentiate the official account and mini program.
I came to know that wechat mini doesnt have push notification but client wants to send the push notification from mini program.
The requirement is that mini program URL will be configured in official menu URL so when User will click to the link wechat will redirect to mini porgram when user clicks on any action then an API call should happen back to the offical program and send the push notification using union ID. Is my assumption right and is it possible?
If by "push notification", you mean sending template message to WeChat users. WeChat's mini-program does offer an API for that.
Here's an article on how to do it
And the other solution as you mentioned, using unionID to get user's official account openID to send a message would also work, but the process is way more complicated. Because currently, WeChat doesn't have a simple API that let you retrieve user's openID with unionID. Meaning you will have to store the relationship of unionID and openID by yourself.
Hope this helps. :D
I think you maybe need the customer service message function,here is the article from the official sites:
customer service message

Get Internal Server Error for Get Information About App Instance

When I try to send Get Request in Postman in the Url
'https://iid.googleapis.com/iid/info/IID_TOKEN', it gives me Internal Server Error.
The IID_TOKEN I get is from FCM (Firebase Cloud Messaging) Server Key.
The YOUR_API_KEY I get is from FCM (Firebase Cloud Messaging) Legacy Server Key.
Am I sending the correct IID_TOKEN and YOUR_API_KEY? Or is it any authorization that I have not done?
Please help me on this.
Thank you.
How you obtain the IID_TOKEN depends on the client SDK you are using. In the Cloud Messaging Guide, the section for each client SDK (e.g. iOS, Android, Web, etc) has a topic titled Send Your First Message with a step describing how to obtain the registration token. For example, the Android description says to use FirebaseInstanceId.getInstance().getToken().
From your post, it sounds like you are using a server key, which is not correct.
There is an example GET request in the documentation.

launch sms application from browser in Meteor

A Meteor client code running on smartphone needs to send SMS using the phone sms app. How would you approach this task with out EmailSMS gateway?
All the SO posts I read were not Meteor specific. Any one tried this Cordova extensions and can give some feedback on how to use it? Thanks
The Cordova access rules you mention are only to handle special links that open the device's default app which handles the corresponding service.
Think of it exactly like a Open a mail composer in a browser, that opens an email creation window from your default mail client when you click on the link. You can even pre-populate the body content of your SMS, like with the mailto link.
Now if I understand correctly your objective, you would like to automatically send an SMS, as if you had sent an email to an Email2SMS 3rd party service that would convert it to an SMS and send it to your recipient on your behalf. Except that you want to get rid of that 3rd party?
In that case, you would be interested in actual Cordova plugins for SMS functionality.

encrypted push notification messages to be pushed from MobileFirst server to mobile

We are developing an Banking Mobile application using MobileFirst V7.1 which should be much secured. I implemented the normal IBM MobileFirst push notification in our application.
Following are the requirements from the client:
1) To send some sensitive information to the customer as notification, hence want to send secured or encrypted push notification messages to the mobile client from MobileFirst server through GCM or APNS. Is there any built-in Worklight/MobileFirst API available to fullfill the requiremnt, Can anyone please help me in suggesting some solution to fullfill this requirement. It will be very greatful if some one give me solutions for this.
2) Also Client requirement is to send platform specific notification, some push notification to be send only to Iphone and some specific notification only to Android devices. Is there any option in the SubmitNotification() method to send platform specific push notifications.
3) Currenly we are providing a url "http://IPAddress:8080/invoke?adapter=ADAPTER_NAME&procedure=PROCEDURE_NAME&parameters=[PARAMETER1,PAREMETER2,...]" to the web service team to hit this URL to send the push notifications. Currently this URL is public any anyone who knows the URL can execute or hit the URL and send the notification. I need to protect this URL where no unknown resource or unauthorised person should access the URL. If some tries to hit/access the URL, it should ask for the credentials and the URL should be secured as we are dealing with Banking application everything should be secured hence the push notification URL should be secure. Can anyone please tell me how to implement this.
Thanks in advance
Karthik
Your first question has already been previously answered; don't duplicate your own questions: secured or encrypted push notification messages from MobileFirst server
For your second question, send separate notifications. Once for APNS and once for GCM... and you should use the submitMessage API instead. See here: http://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.apiref.doc/html/refjavascript-server/html/WL.Server.html#sendMessage
Your third question should be directed at your own IT Security team, because this is something that you need to do in your organization. Your IT team should know how to protect internal resources with your firewall settings, to not allow incoming connections from the public internet, but only internal connections from your organization network.

Send Parse Push Notifications with ASP.net

I have developed an android application with the Parse push notification service and I can send notification from the Parse website.
How can I send push notifications through my own website using ASP.net? Is there any way?
I checked the Parse documentation but i get confused, I would really appreciate it if someone would help me.
Thanks
I ran into similar confusion. I wasn't even sure how to properly setup the user so that I could send a push notification directly to them. Then I found the following post:
Channels and Targeted Push Notifications
Note the last item under the Channels heading:
Most apps might find it useful to have a channel for each user so that
they can send messages to a user across all their devices and have
users follow others in the app.
So, now I know that I should subscribe each user to a channel that uniquely identifies the user (e.g., the 'bobsmith#foo.org' channel).
After I have subscribed the user to their channel, I can call Parse's REST API via my ASP.NET application. See Sending Pushes in the Parse REST API Developers Guide.
For an ASP.NET/C# example of how to submit a push notification check out this answer.

Resources