forum

osu!api to google sheets

posted
Total Posts
5
Topic Starter
Heddorin
Did someone know how to connect osu!api to sheet? I tried to find any information about it, but..
abraker
What are you trying to achieve?
Topic Starter
Heddorin

abraker wrote:

What are you trying to achieve?
I want to set up my profiles sheet. I tried to use regex, but I can't figure out how I can get the values of the pp and the rank. smb said that i can use google scripts and osu api for it

It would be better if I could use regexp
abraker
First register the application you will use the osu!apiv2 for here
home/account/edit#new-oauth-application

Second, read about Google app scripts
https://www.benlcollins.com/apps-script/google-apps-script-beginner-guide/

Go through google app script documentation on requesting web data
https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app

You will need to get auth from osu!apiv2 as detailed here before you can use it
docs/index.html#authorization-code-grant

That will give you an access token which you will need to provide with every osu!apiv2 request. Access token goes in the header of each requests, where "{token}" gets replaced with access token:
{ "Authorization": "Bearer {token}" }
Orisgeinkras
Technically, you can avoid using API OAuth by going to
users/[user]/scores/best
I recently did this for a similar project, over at this post. Feel free to reuse the code for your project too, if applicable!
Please sign in to reply.

New reply