Spaces:
Sleeping
Sleeping
Download get_group_id.sh from fromnowoncoding/2fa_multiple: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/spaces/fromnowoncoding/2fa_multiple/resolve/main/get_group_id.sh
- Command line
-
hf download hf://spaces/fromnowoncoding/2fa_multiple/get_group_id.sh
-
curl -L -o get_group_id.sh https://huggingface.co/spaces/fromnowoncoding/2fa_multiple/resolve/main/get_group_id.sh
556 Bytes
| if [ -z "$1" ]; then | |
| echo "請提供 LINE Channel Access Token" | |
| echo "使用方式: ./get_group_id.sh YOUR_CHANNEL_ACCESS_TOKEN" | |
| exit 1 | |
| fi | |
| TOKEN=$1 | |
| # 使用 curl 呼叫 LINE API | |
| response=$(curl -s -X GET https://api.line.me/v2/bot/info \ | |
| -H "Authorization: Bearer $TOKEN") | |
| echo "Bot 資訊:" | |
| echo "$response" | python3 -m json.tool | |
| echo -e "\n要取得特定群組的資訊,請使用以下指令:" | |
| echo "curl -X GET https://api.line.me/v2/bot/group/{GROUP_ID}/summary \\" | |
| echo " -H 'Authorization: Bearer $TOKEN'" | |