This repository has been archived by the owner on Feb 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrichmenu-script.sh
97 lines (94 loc) · 2.27 KB
/
richmenu-script.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
curl -v -X POST https://api.line.me/v2/bot/richmenu \
-H 'Authorization: Bearer ${LINE_OFFICIAL_TOKEN}' \
-H 'Content-Type: application/json' \
-d \
'{
"size": {
"width": 2500,
"height": 1686
},
"selected": false,
"name": "index",
"chatBarText": "呼叫情報員",
"areas": [
{
"bounds": {
"x": 0,
"y": 0,
"width": 834,
"height": 843
},
"action": {
"type": "message",
"text": "[選單]校園公車時間表"
}
},
{
"bounds": {
"x": 834,
"y": 0,
"width": 833,
"height": 843
},
"action": {
"type": "message",
"text": "[選單]清華校內工讀"
}
},
{
"bounds": {
"x": 1667,
"y": 0,
"width": 833,
"height": 843
},
"action": {
"type": "message",
"text": "[選單]切換主動推播"
}
},
{
"bounds": {
"x": 0,
"y": 843,
"width": 834,
"height": 843
},
"action": {
"type": "message",
"text": "[選單]校務專區"
}
},
{
"bounds": {
"x": 834,
"y": 843,
"width": 833,
"height": 843
},
"action": {
"type": "message",
"text": "[選單]校園地圖查詢"
}
},
{
"bounds": {
"x": 1667,
"y": 843,
"width": 833,
"height": 843
},
"action": {
"type": "message",
"text": "!"
}
}
]
}'
curl -v -X POST https://api-data.line.me/v2/bot/richmenu/richmenu-02fd8dc39fdeb6acb99d6d8f920e3a80/content \
-H "Authorization: Bearer ${LINE_OFFICIAL_TOKEN}" \
-H "Content-Type: image/png" \
-T richmenu-index-vRE.png
curl -v -X POST https://api.line.me/v2/bot/user/all/richmenu/richmenu-19682466851b21e2d7c0ed482ee0930f \
-H 'Authorization: Bearer {channel access token}'
-H 'Content-Length: 0'