ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
982 stars 384 forks source link

How to send login info with cURL to get temporary code in oauth2 authorization process with osu!api v2 #6721

Closed A-BCDe closed 4 years ago

A-BCDe commented 4 years ago

I'm having trouble logging in to the site when I try:

curl -X GET https://osu.ppy.sh/oauth/authorize?response_type=code&client_id=some_client_id&redirect_uri=https://example.com&scope=public

Will there be a way to send a login information with the above command so that I can get the code immediately?

If there is no simple way to do this except mimicking the javascript which runs when pressing the button, I think this should also be implemented as a part of the api.

cl8n commented 4 years ago

if you want to get public info with no user interaction (like osu api v1) you should use client credentials grants, not auth code.

notbakaneko commented 4 years ago

No, authorization code grants always require user interaction. Use client credential instead, as mentioned above.