LINE Integration
curl --request POST \
--url https://api.pathors.com/project/{projectId}/integration/line/callbackimport requests
url = "https://api.pathors.com/project/{projectId}/integration/line/callback"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.pathors.com/project/{projectId}/integration/line/callback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pathors.com/project/{projectId}/integration/line/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pathors.com/project/{projectId}/integration/line/callback"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pathors.com/project/{projectId}/integration/line/callback")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pathors.com/project/{projectId}/integration/line/callback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Integration APIs
LINE Integration
The LINE integration endpoint allows you to receive and process messages from LINE Messaging API.
POST
/
project
/
{projectId}
/
integration
/
line
/
callback
LINE Integration
curl --request POST \
--url https://api.pathors.com/project/{projectId}/integration/line/callbackimport requests
url = "https://api.pathors.com/project/{projectId}/integration/line/callback"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.pathors.com/project/{projectId}/integration/line/callback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pathors.com/project/{projectId}/integration/line/callback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pathors.com/project/{projectId}/integration/line/callback"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pathors.com/project/{projectId}/integration/line/callback")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pathors.com/project/{projectId}/integration/line/callback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Webhook Endpoint
Path Parameters
string
required
The ID of your project
Request Headers
LINE Messaging API will send requests with specific headers for authentication and verification.Request Body
The request body follows the LINE Messaging API webhook event format. Example:{
"events": [
{
"type": "message",
"message": {
"type": "text",
"text": "Hello"
},
"timestamp": 1462629479859,
"source": {
"type": "user",
"userId": "U4af4980629..."
},
"replyToken": "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA",
"mode": "active"
}
]
}
Response
string
Status message indicating the result of the webhook processing
{
"message": "OK"
}
Error Responses
| Status Code | Description |
|---|---|
| 400 | Integration is disabled |
| 404 | Integration not found |
| 500 | Internal server error |
Setup Guide
- Create a LINE channel in the LINE Developers Console
- Configure the webhook URL in your LINE channel settings
- Enable the LINE integration in your Pathors project settings
- Add your LINE channel access token to the integration configuration
