AnsweredAssumed Answered

How FileMaker invoke public interface

Question asked by windtech on May 9, 2018
Latest reply on May 14, 2018 by beverly

Hi There

 

Can anyone advise how FileMaker invoke HTTP interface from 3rd party, such as Google, etc, to get and post JSON type data. Are there any good samples you can provide. thanks so much.

 

Firstly, I want to invoke the http request (GET) to get JSON data from below interface;
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET

 

Return data sample;
{"access_token":"ACCESS_TOKEN","expires_in":7200}

 

Secondly, I got the access_token from above and then send JSON data using below http request (POST);
https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN

 

Sending data sample;
{
           "touser":"OPENID",
           "template_id":"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY",
           "url":"http://weixin.qq.com/download", 
           "miniprogram":{
             "appid":"xiaochengxuappid12345",
             "pagepath":"index?foo=bar"
           },         
           "data":{
                   "first": {
                       "value":"welcome!!!",
                       "color":"#173177"
                   },
                   "keyword1":{
                       "value":"Chocolate",
                       "color":"#173177"
                   },
                   "keyword2": {
                       "value":"39.8",
                       "color":"#173177"
                   },
                   "keyword3": {
                       "value":"2014/9/22",
                       "color":"#173177"
                   },
                   "remark":{
                       "value":"welcome next time!",
                       "color":"#173177"
                   }
           }
}

Outcomes