This commit is contained in:
richboo111
2022-11-01 09:57:47 +08:00
parent 54bbbc4d72
commit 2ab9ea099c
2 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
package token_refresh_response
import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
type TokenRefreshResponse struct {
doudian_sdk.BaseDoudianOpApiResponse
Data *TokenRefreshData `json:"data"`

View File

@@ -28,9 +28,11 @@ func TestQueryOrderDetail(t *testing.T) {
}
func TestRefaseToken(t *testing.T) {
a.CreateToken("5497af2f-eff3-4d70-bb32-60544b8102bb")
//a.RefreshToken()
// {"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}
//a.CreateToken("c4afc5bc-7ddf-4244-b35a-0c393f3dca32")
refreshToken, err := a.RefreshToken()
fmt.Println(refreshToken)
fmt.Println(err)
//{"access_token":"c4afc5bc-7ddf-4244-b35a-0c393f3dca32","expires_in":1667203717,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"5a4f9dfe-306b-4bca-8b35-2ae9afc0245e","authority_id":""}
//{"access_token":"37f41ac7-49ac-4848-a0ee-ea86bb0dfd9f","expires_in":519389,"scope":"SCOPE","shop_id":"","shop_name":"抖店开放平台测试专用店","refresh_token":"3dd8f638-fdf1-46e7-b974-88df382f03c6","authority_id" :""}
}