Skip to main content
POST
/
project
/
{projectId}
/
integration
/
line
/
callback
LINE Integration
curl --request POST \
  --url https://api.pathors.com/project/{projectId}/integration/line/callback
import 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

projectId
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

message
string
Status message indicating the result of the webhook processing
Example successful response:
{
  "message": "OK"
}

Error Responses

Status CodeDescription
400Integration is disabled
404Integration not found
500Internal server error

Setup Guide

  1. Create a LINE channel in the LINE Developers Console
  2. Configure the webhook URL in your LINE channel settings
  3. Enable the LINE integration in your Pathors project settings
  4. Add your LINE channel access token to the integration configuration