larksuite/oapi-sdk-python

RefreshAccessToken got invalid request

Opened this issue · 0 comments

Error Message: client.authen.v1.refresh_access_token.create failed, code: 20001, msg: invalid request, grant_type should be authorization_code or refresh_token,
The grant_type is already set to 'refresh_token', same refresh_token works on pure curl request.

request: CreateRefreshAccessTokenRequest = CreateRefreshAccessTokenRequest.builder()
.request_body(CreateRefreshAccessTokenRequestBody.builder()
.grant_type("refresh_token")
.refresh_token("xxxxx")
.build())
.build()