-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.http
More file actions
32 lines (23 loc) · 1.08 KB
/
test.http
File metadata and controls
32 lines (23 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Mastodon API
@baseUrl = {{$dotenv MastodonUrl}}
@accountId = {{$dotenv AccountId}}
### 固定投稿一覧取得
GET {{baseUrl}}/api/v1/accounts/{{accountId}}/statuses?pinned&limit=1 HTTP/1.1
Authorization: Bearer {{$dotenv Token}}
### アカウント情報取得
GET {{baseUrl}}/api/v1/accounts/verify_credentials HTTP/1.1
Authorization: Bearer {{$dotenv Token}}
### アカウント情報設定
PATCH {{baseUrl}}/api/v1/accounts/update_credentials HTTP/1.1
Authorization: Bearer {{$dotenv Token}}
Content-Type: application/json
{
"discoverable": true,
"indexable": true
}
### アクセストークン取得
GET {{baseUrl}}/oauth/authorize?response_type=code&client_id={{$dotenv CLIENT_ID}}&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope={{$dotenv SCOPE}} HTTP/1.1
### アクセストークン取得
POST {{baseUrl}}/oauth/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
client_id={{$dotenv CLIENT_ID}}&client_secret={{$dotenv CLIENT_SECRET}}&grant_type=authorization_code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope={{$dotenv SCOPE}}&code={{$dotenv CODE}}