I want to send a message from Python to LINE Bot

I want to use Python for the first time in a long time I am making a LINE Bot with reference to this page.

https://blue-black.ink/?p=3935

What i did 1, in the terminal

pip install requests

I sent that.

2, Preparing to send a message to LINE with Python ””” token = "Enter me" payload = {"massage": "Hello World"} url = "http://notify-api.line.me/api/notify" headers = {"Authorizatino": "Bearer" + token} res = requests.post(url, data=payload, headers=headers) print(res) ”””

If you do this

Process finished with exit code 0

It was displayed like this and there was no message on the line. (This sentence seems to mean that it was sent normally)

    1. To the command

python test.py

Enter

Response[200]

Is said to be successful when

python: can't open file 'test.py': [Errno 2] No such file or directory

Is displayed.

No message has come to the line yet. For some reason ... I wonder if I can find out in a day today ...

Recommended Posts

I want to send a message from Python to LINE Bot
[LINE Messaging API] I want to send a message from the program to everyone's LINE
Send a message from Slack to a Python server
Send a message to LINE with Python (LINE Notify)
How to install NPI + send a message to line with python
I want to start a lot of processes from python
I want to use jar from python
I want to build a Python environment
I want to know the weather with LINE bot feat.Heroku + Python
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
I want to create a window in Python
[Python] I want to manage 7DaysToDie from Discord! 1/3
I want to make a game with Python
I want to use ceres solver from python
[Python] I want to manage 7DaysToDie from Discord! 2/3
I want to make C ++ code from Python code!
I want to write to a file with Python
I want to send a signal only from the sub thread to the main thread
[Python memo] I want to get a 2-digit hexadecimal number from a decimal number
I want to embed a variable in a Python string
I want to easily implement a timeout in python
I want to iterate a Python generator many times
I want to generate a UUID quickly (memorandum) ~ Python ~
I want to write in Python! (2) Let's write a test
I want to randomly sample a file in Python
I want to work with a robot in python.
I made a LINE BOT with Python and Heroku
[Python3] I want to generate harassment names from Japanese!
[Python] I want to make a nested list a tuple
I want to send a business start email automatically
I want to run a quantum computer with Python
I made a Line Bot that uses Python to retrieve unread Gmail emails!
In Python, I made a LINE Bot that sends pollen information from location information.
Create a setting in terraform to send a message from AWS Lambda Python3.8 to Slack
[Python] I made a system to introduce "recipes I really want" from the recipe site!
I want to tell people who want to import from a higher directory with Python direnv
[Python] I asked LINE BOT to answer the weather forecast.
I want to write a triple loop and conditional branch in one line in python
Send a push message to the LINE Bot when the LTE-M Button is pressed [SORACOM]
I want to install a package from requirements.txt with poetry
I want to debug with Python
I want to make input () a nice complement in python
[Python] I made a Line bot that randomly asks English words.
I want to use a wildcard that I want to shell with Python remove
I created a Python library to call the LINE WORKS API
Post a message from IBM Cloud Functions to Slack in Python
How to get a string from a command line argument in python
I want to do a full text search with elasticsearch + python
I want to make a parameter list from CloudFormation code (yaml)
I want to print in a comprehension
[Python] [LINE Bot] Create a parrot return LINE Bot
I want to analyze logs with Python
Python beginners decided to make a LINE bot with Flask (Flask rough commentary)
A story I was addicted to when inserting from Python to a PostgreSQL table
I tried to make "Sakurai-san" a LINE BOT with API Gateway + Lambda
I want to color a part of an Excel string in Python
I tried to send a registration completion email from Gmail with django.
A note I looked up to make a command line tool in Python
Python: I want to measure the processing time of a function neatly
I want to make a web application using React and Python flask
I want to do a monkey patch only partially safely in Python