diff --git a/msg.go b/msg.go index be62a1e..cf6fd52 100644 --- a/msg.go +++ b/msg.go @@ -24,8 +24,8 @@ func NewMessageCenter(host, clientKey, clientSecret, serverIndex, tempIndex stri }, } msg.header = map[string]string{"content-type": "application/json; charset=utf-8"} - accessToken, err := msg.getAccessToken() - msg.header = map[string]string{"Authorization": accessToken, "content-type": "application/json; charset=utf-8"} + token, err := msg.getAccessToken() + msg.header = map[string]string{"Authorization": token, "content-type": "application/json; charset=utf-8"} return msg, err }