2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Line APIをcurlで叩く

2
Last updated at Posted at 2016-12-03

今回はcurlでuserのprofileを取るAPIをcurlで叩いてみた。

curl "https://api.line.me/v2/bot/profile/{user_id}"\ 
-H "X-Line-ChannelSecret: {ChannelSecret}"\
-H "Authorization: Bearer {Channel_Access_Token}"

これが失敗した場合は認証などに問題がある

取れた

{"displayName":"{lineの名前}","userId":"{user_id}","pictureUrl":"{profile写真のurl}","statusMessage":"{lineの一言}"}
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?