ppy / osu-api

Public API for accessing osu! related data.
320 stars 16 forks source link

how to get user background image #295

Closed Maxluli closed 4 years ago

Maxluli commented 4 years ago

I would like to get the user background images. But when i inspect the osu website i found https://assets.ppy.sh/user-profile-covers/10707364/f6b09f3b138d75266005a1c9d78e985b95021da1ac16d32429d8f10c2db8c895.jpeg as link to get my profile background. BUT i dont understand how it works, because for example the link of my friend background is https://assets.ppy.sh/user-profile-covers/9100285/2bcafc10c4b60130e3bbd2ab3c1ff396468712c071dcd759619e9576f59747bf.jpeg. i can see that the user id is needed, but there is this f6b09f3b138d75266005a1c9d78e985b95021da1ac16d32429d8f10c2db8c895 string that is also changing and i dont know how to get it for every user with the api.

peppy commented 4 years ago

You will need to use the v2 API for this. Full documentation isn't finished yet but you can use this call: https://docs.ppy.sh/#apiv2usersusermode

Register for an OAuth token from your user settings page: https://osu.ppy.sh/home/account/edit

omkelderman commented 4 years ago

sidenote: to my knowledge that endpoint is not available to the public yet. Afaik there is no scope available for that endpoint, at least last time I tried I got a scope-error. Related to https://github.com/ppy/osu-web/issues/4798 I think

You can however use https://docs.ppy.sh/#apiv2memode, there is a scope available for that call, but you need end-user authentication for that

peppy commented 4 years ago

We are actively working on exposing more endpoints, so you may see this change this week or next week.