API: me.json
Use http://www.reddit.com/api/me.json
to grab information about the currently logged in user.
Note: Using the .xml
extension still returns JSON.
If the reddit_session
cookie is not present in the request, the API will return the following:
{"json": {"errors": []}}
Otherwise, the API will return something like the following about the currently logged in user:
{
"kind": "t2",
"data": {
"has_mail": false,
"name": "username",
"created": 1213716360.0,
"modhash": "f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0",
"created_utc": 1213716360.0,
"link_karma": 5000,
"comment_karma": 10000,
"is_gold": false,
"is_mod": true,
"id": "0ffff",
"has_mod_mail": false
}
}
-
###kind (string)
The type of thing (see glossary on the API page) this is, which translates to account.
-
###data (object)
Holds relevant user data.
-
###has_mail (boolean)
Says whether the user has unread mail from messaging or comment/post replies.
-
###name (string)
Logged in user's username
-
###created (number)
Unix time that the user's account was created in the time zone the server is set to?.
-
###modhash (string)
The user's modhash (see glossary on the API page)
-
###created_utc (string)
-
###link_karma (number)
The user's link karma.
-
###comment_karma (number)
The user's comment karma.
-
###is_gold (boolean)
Says whether the user is a reddit gold member.
-
###is_mod (boolean)
Says whether the user is a moderator.
-
###id (string)
The user's ID. This is only used internally__, right?__.
-
###has_mod_mail (boolean)
Says whether the user has unread moderator mail.
-