{“error”: “download token authfailed”} appears when accessing the seven cow download link to download apk

  golang, question
  1. Sometimes the same resource can be downloaded and sometimes cannot be downloaded (the current one is found to be unable to be downloaded at present). The key is stored in our mysql table after uploading. When I download, I take the key from the table and splice the download links.

func (mac *Mac) Sign(data []byte) (token string) {

h := hmac.New(sha1.New, mac.SecretKey)
 h.Write(data)
 
 sign := base64.URLEncoding.EncodeToString(h.Sum(nil))
 return fmt.Sprintf("%s:%s", mac.AccessKey, sign)

}
The code is encoded using secure urlbase64.

I copy the link to the browser and can see Chinese
图片描述

This is because some nodes testing domain names will report 401 errors, so the same link can sometimes be downloaded and sometimes cannot be downloaded.