What is the full curl command to get access token with request token?

Open
#86 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
42/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Review the repository's OAuth tutorial and the /oauth/token requests shown in the issue, starting with the refresh_token flow. Confirm the supported request form and update the tutorial with a working curl command; done when the refresh-token renewal steps and required parameters are documented clearly.

Written by the indexing model from the issue text.

Description

Hi,
The sample in this repo is pretty straightforward and clear. Thanks.

One thing is not mentioned in tutorial is getting new access_token with refresh_token as way of renewing an access_token.

I tried below command and the other which had auth tuple and both failed.

$ curl -XPOST http://127.0.0.1:8000/oauth/token -F grant_type=refresh_token -F refresh_token=NogJYgBFjH3NmTBDHdDYTCUQBQaMXBFZThdjaHtjraEuT9HM
{"error": "invalid_client"}

The other test is adding client_id and cilent_secret:

curl -u ${client_id}:${client_secret} -XPOST http://127.0.0.1:8000/oauth/token -F grant_type=refresh_token -F scope=profile -F refresh_token=${refresh_token}
{"error": "unauthorized_client"}

What is the correct curl command to get access token with refresh token?

Thanks

Dominant language
Python
Stars
705
Forks
279
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from authlib/example-oauth2-server

All issues in authlib/example-oauth2-server

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.