Skip to main content
GET
/
users
/
me
Get Current User
curl --request GET \
  --url https://api.example.com/users/me \
  --header 'Authorization: <authorization>'
{
  "id": 123,
  "githubId": "<string>",
  "email": "<string>",
  "username": "<string>",
  "name": "<string>",
  "avatarUrl": "<string>",
  "githubAccessToken": "<string>",
  "githubRefreshToken": "<string>",
  "installationId": 123,
  "createdAt": "<string>",
  "updatedAt": "<string>"
}
Retrieve the authenticated user’s profile information.

Request

Headers

Authorization
string
required
Bearer token for authentication
Bearer <jwt_token>

Response

Returns the authenticated user’s profile.
id
integer
required
Unique identifier for the user
githubId
string
required
GitHub ID of the user
email
string
Email address of the user
username
string
GitHub username
name
string
Display name of the user
avatarUrl
string
URL to the user’s avatar image
githubAccessToken
string
required
GitHub OAuth access token
githubRefreshToken
string
required
GitHub OAuth refresh token
installationId
integer
GitHub App installation ID
createdAt
string
required
ISO 8601 timestamp of when the user was created
updatedAt
string
required
ISO 8601 timestamp of when the user was last updated

Example

cURL
curl -X GET https://api.diffy.com/users/me \
  -H "Authorization: Bearer <jwt_token>"
Response
{
  "id": 1,
  "githubId": "12345678",
  "email": "[email protected]",
  "username": "johndoe",
  "name": "John Doe",
  "avatarUrl": "https://avatars.githubusercontent.com/u/12345678",
  "githubAccessToken": "gho_xxxxxxxxxxxxx",
  "githubRefreshToken": "ghr_xxxxxxxxxxxxx",
  "installationId": 98765,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-20T14:22:00Z"
}

Build docs developers (and LLMs) love