Skip to content
This repository was archived by the owner on Feb 5, 2020. It is now read-only.

Commit dcefcd7

Browse files
committed
Document /v1/user/me endpoint
1 parent 8c73042 commit dcefcd7

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

02.Authentication.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ However, you can also specify the JSON content type using the `Accept` header.
7373

7474
Accept: application/json
7575
{"access_token":[omitted], "scope":"flow,private", "token_type":"bearer"}
76-
76+
7777
### Testing OAuth2 exchange using curl:
7878

7979
You can obtain a token using the command:
@@ -100,3 +100,39 @@ The access token allows you to make requests to the API on behalf of a user.
100100
GET https://api.gitter.im/v1/user
101101
Authorization: Bearer OAUTH-TOKEN
102102
Host: api.gitter.im
103+
104+
105+
## Check who you are authenticated as
106+
107+
### Parameters
108+
109+
- *none*
110+
111+
```
112+
GET /v1/user/me
113+
```
114+
115+
Try it from the CLI:
116+
```
117+
'demo api-access';
118+
{
119+
"verb": "get",
120+
"resource": "{{api_url}}/v1/user/me"
121+
}
122+
```
123+
124+
```
125+
{
126+
"id": "553d437215522ed4b3df8c50",
127+
"username": "MadLittleMods",
128+
"displayName": "Eric Eastwood",
129+
"url": "/MadLittleMods",
130+
"avatarUrl": "https://avatars-05.gitter.im/gh/uv/3/MadLittleMods",
131+
"staff": true,
132+
"providers": [
133+
"github"
134+
],
135+
"v": 8,
136+
"gv": "3"
137+
}
138+
```

0 commit comments

Comments
 (0)