Overview

Namespaces

  • LINE
    • LINEBot
      • Constant
      • Event
        • MessageEvent
        • Parser
      • Exception
      • HTTPClient
      • ImagemapActionBuilder
      • MessageBuilder
        • Imagemap
        • TemplateBuilder
      • TemplateActionBuilder

Classes

  • LINEBot
  • Overview
  • Namespace
  • Class

Class LINEBot

A client class of LINE Messaging API.

Namespace: LINE
Package: LINE
Located at LINEBot.php
Methods summary
public
# __construct( LINE\LINEBot\HTTPClient $httpClient, array $args )

LINEBot constructor.

LINEBot constructor.

Parameters

$httpClient
HTTP client instance to use API calling.
$args
Configurations.
public LINE\LINEBot\Response
# getProfile( string $userId )

Gets specified user's profile through API calling.

Gets specified user's profile through API calling.

Parameters

$userId
The user ID to retrieve profile.

Returns

LINE\LINEBot\Response
public LINE\LINEBot\Response
# getMessageContent( string $messageId )

Gets message content which is associated with specified message ID.

Gets message content which is associated with specified message ID.

Parameters

$messageId
The message ID to retrieve content.

Returns

LINE\LINEBot\Response
public LINE\LINEBot\Response
# replyMessage( string $replyToken, LINE\LINEBot\MessageBuilder $messageBuilder )

Replies arbitrary message to destination which is associated with reply token.

Replies arbitrary message to destination which is associated with reply token.

Parameters

$replyToken
Identifier of destination.
$messageBuilder
Message builder to send.

Returns

LINE\LINEBot\Response
public LINE\LINEBot\Response
# replyText( string $replyToken, string $text, string[]|null $extraTexts = null )

Replies text message(s) to destination which is associated with reply token.

Replies text message(s) to destination which is associated with reply token.

This method receives variable texts. It can send text(s) message as bulk.

Exact signature of this method is

replyText(string $replyToken, string $text, string[] $extraTexts)

.

Means, this method can also receive multiple texts like so;

$bot->replyText('reply-text', 'text', 'extra text1', 'extra text2', ...)

Parameters

$replyToken
Identifier of destination.
$text
Text of message.
$extraTexts
Extra text of message.

Returns

LINE\LINEBot\Response
public LINE\LINEBot\Response
# pushMessage( string $to, LINE\LINEBot\MessageBuilder $messageBuilder )

Sends arbitrary message to destination.

Sends arbitrary message to destination.

Parameters

$to
Identifier of destination.
$messageBuilder
Message builder to send.

Returns

LINE\LINEBot\Response
public LINE\LINEBot\Response
# multicast( array $tos, LINE\LINEBot\MessageBuilder $messageBuilder )

Sends arbitrary message to multi destinations.

Sends arbitrary message to multi destinations.

Parameters

$tos
Identifiers of destination.
$messageBuilder
Message builder to send.

Returns

LINE\LINEBot\Response
public LINE\LINEBot\Response
# leaveGroup( string $groupId )

Leaves from group.

Leaves from group.

Parameters

$groupId
Identifier of group to leave.

Returns

LINE\LINEBot\Response
public LINE\LINEBot\Response
# leaveRoom( string $roomId )

Leaves from room.

Leaves from room.

Parameters

$roomId
Identifier of room to leave.

Returns

LINE\LINEBot\Response
public LINE\LINEBot\Event\BaseEvent[]
# parseEventRequest( string $body, string $signature )

Parse event request to Event objects.

Parse event request to Event objects.

Parameters

$body
Request body.
$signature
Signature of request.

Returns

LINE\LINEBot\Event\BaseEvent[]
public boolean
# validateSignature( string $body, string $signature )

Validate request with signature.

Validate request with signature.

Parameters

$body
Request body.
$signature
Signature of request.

Returns

boolean
Request is valid or not.
Constants summary
string DEFAULT_ENDPOINT_BASE
# 'https://api.line.me'
line-bot-sdk-php API documentation generated by ApiGen