|
|
|
@@ -61,7 +61,7 @@ func readTokenFromFile(path string) (authToken, error) { |
|
|
|
//issue web request to get token from wechat |
|
|
|
func renewAuthtoken() (authToken, error) { |
|
|
|
//url := "http://vimeo.com/api/v2/brad/info.json" |
|
|
|
url := "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx876e233fde456b7b&secret=4a91aa328569b10a9fb97adeb8b0af58" |
|
|
|
url := fmt.Sprintf("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", APIConfig.Appid, APIConfig.AppSecret) |
|
|
|
var myClient = &http.Client{Timeout: 20 * time.Second} |
|
|
|
r, err := myClient.Get(url) |
|
|
|
if err != nil { |