Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Public endpoints

LiangXiang Shen edited this page Apr 18, 2019 · 6 revisions

For a full endpoints list, check ppy/osu-web:/routes/web.php@line//API

Related: API v2 knowledge
Don't forget to add the Authorization: {$token_type} {$token} HTTP Header

/me

Required scope: identify

Returns the profile data for the currently authorized user which contains the information which is on the users profile page.

Request

GET /me

Response

statistics is related to his playmode. You can't access any mode except his default mode, at least now.

JSON
{
    "id": 9367540,
    "username": "kj415j45",
    "join_date": "2016-12-04T03:43:39+00:00",
    "country": {
        "code": "CN",
        "name": "China"
    },
    "avatar_url": "https://a.ppy.sh/9367540?1505577694.jpeg",
    "is_supporter": false,
    "has_supported": true,
    "is_gmt": false,
    "is_qat": false,
    "is_bng": false,
    "is_bot": false,
    "is_active": true,
    "interests": "osu!, code, steam",
    "occupation": "Student",
    "title": null,
    "location": "SWU(RongChang), China",
    "last_visit": "2019-02-10T07:51:00+00:00",
    "twitter": "kj415j45",
    "lastfm": null,
    "skype": "QQ: 919815238",
    "website": "https://kj415j45.space",
    "discord": "kj415j45#3309",
    "playstyle": ["keyboard", "tablet"],
    "playmode": "osu",
    "pm_friends_only": false,
    "post_count": 24,
    "profile_colour": null,
    "profile_order": ["me", "top_ranks", "recent_activity", "historical", "medals", "beatmaps", "kudosu"],
    "cover_url": "https://assets.ppy.sh/user-profile-covers/9367540/02ac0c9670be6d3ad00529245b53b0104384a6887fcf8bfe92ed68ecd2b28312.jpeg",
    "cover": {
        "custom_url": "https://assets.ppy.sh/user-profile-covers/9367540/02ac0c9670be6d3ad00529245b53b0104384a6887fcf8bfe92ed68ecd2b28312.jpeg",
        "url": "https://assets.ppy.sh/user-profile-covers/9367540/02ac0c9670be6d3ad00529245b53b0104384a6887fcf8bfe92ed68ecd2b28312.jpeg",
        "id": null
    },
    "kudosu": {
        "total": 0,
        "available": 0
    },
    "max_blocks": 25,
    "max_friends": 250,
    "account_history": [],
    "active_tournament_banner": [],
    "badges": [
	    {
	        "awarded_at": "2018-04-03T04:29:52+00:00",
	        "description": "Outstanding contribution and organization of the Chinese localisation project for osu!, osu!wiki and osu!lazer",
	        "image_url": "https://assets.ppy.sh/profile-badges/contributor.jpg"
	    }, {...}, ...
    ],
    "favourite_beatmapset_count": [52],
    "follower_count": [164],
    "graveyard_beatmapset_count": [0],
    "loved_beatmapset_count": [0],
    "monthly_playcounts": [
	    {
	        "start_date": "2016-12-01",
	        "count": 269
	    }, {...}, ...
    ],
    "page": {
        "html": "",
        "raw": ""
    },
    "previous_usernames": [],
    "ranked_and_approved_beatmapset_count": [0],
    "replays_watched_counts": [
	    {
	        "start_date": "2017-07-01",
	        "count": 1
	    }, {...}, ...
    ],
    "scores_first_count": [0],
    "statistics": {
        "level": {
            "current": 83,
            "progress": 59
        },
        "pp": 1826.98,
        "pp_rank": 146494,
        "ranked_score": 1647237303,
        "hit_accuracy": 89.6849,
        "play_count": 4768,
        "play_time": 365093,
        "total_score": 3861238114,
        "total_hits": 1140103,
        "maximum_combo": 1089,
        "replays_watched_by_others": 3,
        "is_ranked": true,
        "grade_counts": {
            "ss": 9,
            "ssh": 4,
            "s": 123,
            "sh": 18,
            "a": 196
        },
        "rank": {
            "global": 146494,
            "country": 3752
        },
        "scoreRanks": {
            "XH": 4,
            "SH": 18,
            "X": 9,
            "S": 123,
            "A": 196
        }
    },
    "support_level": 0,
    "unranked_beatmapset_count": [0],
    "user_achievements": [
        {
            "achieved_at": "2019-02-09T05:45:17+00:00",
            "achievement_id": 47
        }, {...}, ...
    ]
}

/friends

Required scope: friends.read

Returns the friends list for the currently authorized user.

Request

GET /friends

Response

Sort by username asc

JSON
[
  {
    "id": 3,
    "username": "BanchoBot",
    "profile_colour": "#e45678",
    "avatar_url": "https:\/\/a.ppy.sh\/3?1528948612.png",
    "country_code": "SH",
    "default_group": "bot",
    "is_active": true,
    "is_bot": true,
    "is_online": false,
    "is_supporter": false,
    "pm_friends_only": false,
    "country": {
      "code": "SH",
      "name": "Saint Helena"
    },
    "cover": {
      "custom_url": null,
      "url": "https:\/\/osu.ppy.sh\/images\/headers\/profile-covers\/c4.jpg",
      "id": "4"
    }
  }, {...}, ...
]
Clone this wiki locally