larksuite / larksuite/oapi-sdk-python
RefreshAccessToken got invalid request
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 559
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
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()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CreateRefreshAccessTokenRequest construction shown in the issue and compare the SDK request with the working pure curl request. Done means the same refresh_token request is accepted without the invalid-request error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100