Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/o-ga09/line-bot-go
https://github.com/o-ga09/line-bot-go
go line-bot vecel
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/o-ga09/line-bot-go
- Owner: o-ga09
- Created: 2024-07-23T22:06:53.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-28T03:48:13.000Z (5 months ago)
- Last Synced: 2024-09-18T10:08:57.276Z (4 months ago)
- Topics: go, line-bot, vecel
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GoでLINE Messaging APIを使用してLINE Botを作成する
## Overview/概要
`line-bot-sdk-go`の`v8`を使用してLINE BotをGoで作成する
## Deploy/デプロイ方法
```
$ npm i -g vercel
$ vercel login
$ vercel --prod
```## Test/テスト方法
```
$ go test ./...
```## LINE Messaging APIを使用する
- ユーザー情報取得
```
curl --location 'https://api.line.me/v2/bot/profile/[userId]' \
--header 'Authorization: Bearer [access token]'
```- プッシュ通知
```
curl --location 'https://api.line.me/v2/bot/message/push' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer [access token]' \
--data '{
"to": "[userId]",
"notificationDisabled": false,
"messages": [
{
"type": "text",
"text": "Hello"
}
]
}'
```## Licence
MIT @o-ga09