Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LINE Messaging API reference 20190729 vs 20190906
<div class="Main Reference Reference-hasSide">
<div class="Content">
<div class="ReferenceCodesSide"></div>
<ul class="BreadCrumb">
<li><a href="/en/"><span>LINE Developers</span></a></li>
<li><a href="/en/reference/"><span>API references</span></a></li>
<li class="current">Messaging API reference</li>
</ul>
<div class="Article">
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h1 class="h1-document">Messaging API reference</h1>
<div class="TabGroup">
<ul class="Tabs ReferenceCodesNavi">
<li class="Tab js-current"><a href="#" data-tab="shell">shell</a></li>
<li class="Tab"><a href="#" data-tab="java">java</a></li>
<li class="Tab"><a href="#" data-tab="ruby">ruby</a></li>
<li class="Tab"><a href="#" data-tab="go">go</a></li>
<li class="Tab"><a href="#" data-tab="php">php</a></li>
<li class="Tab"><a href="#" data-tab="perl">perl</a></li>
<li class="Tab"><a href="#" data-tab="python">python</a></li>
<li class="Tab"><a href="#" data-tab="nodejs">node.js</a></li>
</ul>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h2 id="common-specifications" class="h2 h2">Common specifications</h2>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="rate-limits" class="h3 h3">Rate limits</h3>
<p>Rate limits for Messaging API requests are as follows. These limits are applied to each endpoint.</p>
<p>Different rate limits are applied depending on the applied plan.</p>
<h4 id="for-bots-associated-with-line-official-accounts" class="h4 h4">For bots associated with LINE official
accounts</h4>
<table class="Table">
<colgroup>
<col data-u-col="5">
<col data-u-col="7">
</colgroup>
<tbody>
<tr>
<th style="word-break: normal">
<p><a href="/en/reference/messaging-api/#send-multicast-message">Send multicast message</a> </p>
</th>
<td style="word-break: normal">
<p>100,000 requests per minute<br>
2,000,000 recipients per minute </p>
</td>
</tr>
<tr>
<th style="word-break: normal">
<p><a href="/en/reference/messaging-api/#send-broadcast-message">Send broadcast message</a><br>
<a href="/en/reference/messaging-api/#get-number-of-delivery-messages">Get number of message
deliveries</a><br>
<a href="/en/reference/messaging-api/#get-number-of-followers">Get number of followers</a><br>
<a href="/en/reference/messaging-api/#get-demographic">Get friend demographics</a> </p>
</th>
<td style="word-break: normal">
<p>60 requests per hour </p>
</td>
</tr>
<tr>
<th style="word-break: normal">
<p>Other API endpoints </p>
</th>
<td style="word-break: normal">
<p>100,000 requests per minute </p>
</td>
</tr>
</tbody>
</table>
<h4 id="for-bots-associated-with-line-accounts" class="h4 h4">For bots associated with LINE@ accounts</h4>
<table class="Table">
<colgroup>
<col data-u-col="5">
<col data-u-col="7">
</colgroup>
<tbody>
<tr>
<th style="word-break: normal">
<p><a href="/en/reference/messaging-api/#send-multicast-message">Send multicast message</a> </p>
</th>
<td style="word-break: normal">
<p>10,000 requests per minute<br>
200,000 recipients per minute </p>
</td>
</tr>
<tr>
<th style="word-break: normal">
<p>Other API endpoints </p>
</th>
<td style="word-break: normal">
<p>10,000 requests per minute </p>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="status-codes" class="h3 h3">Status codes</h3>
<p>The following status codes are returned by the Messaging API.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th style="word-break: normal">Status code</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">200 OK</td>
<td style="word-break: normal">Request successful</td>
</tr>
<tr>
<td style="word-break: normal">400 Bad Request</td>
<td style="word-break: normal">Problem with the request</td>
</tr>
<tr>
<td style="word-break: normal">401 Unauthorized</td>
<td style="word-break: normal">Valid channel access token is not specified</td>
</tr>
<tr>
<td style="word-break: normal">403 Forbidden</td>
<td style="word-break: normal">Not authorized to access the resource. Confirm that your account or plan
is authorized to access the resource.</td>
</tr>
<tr>
<td style="word-break: normal">429 Too Many Requests</td>
<td style="word-break: normal">Exceeded the <a href="#rate-limits">rate limit</a> for API calls</td>
</tr>
<tr>
<td style="word-break: normal">500 Internal Server Error</td>
<td style="word-break: normal">Error on the internal server</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="response-headers" class="h3 h3">Response headers</h3>
<p>The following HTTP headers are included in Messaging API responses.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th style="word-break: normal">Response header</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="word-break: normal">X-Line-Request-Id</td>
<td style="word-break: normal">ID generated for each request</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="error-responses" class="h3 h3">Error responses</h3>
<p>The following JSON data is returned in the response body when an error occurs.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">message</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Message containing information about the error. For more details, see <a
href="#error-messages">Error messages</a>.</td>
</tr>
<tr>
<td style="word-break: normal">details[].message</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Details of the error. Not returned in certain situations.</td>
</tr>
<tr>
<td style="word-break: normal">details[].property</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Location of where the error occurred. Not returned in certain situations.
</td>
</tr>
</tbody>
</table>
<h4 id="error-messages" class="h4 h4">Error messages</h4>
<p>The main error messages that are found in the <code>message</code> property of the JSON error responses are
shown below.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Message</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="word-break: normal">The request body has X error(s)</td>
<td style="word-break: normal">An error was found in the JSON data of the request body. The number of
errors is displayed for "X". Further details are shown in the <code>details[].message</code> and
<code>details[].property</code> properties.</td>
</tr>
<tr>
<td style="word-break: normal">Invalid reply token</td>
<td style="word-break: normal">An invalid reply token was used in the reply message</td>
</tr>
<tr>
<td style="word-break: normal">The property, XXX, in the request body is invalid (line: XXX, column:
XXX)</td>
<td style="word-break: normal">An invalid property was specified in the request body. The specific
property is displayed for "XXX".</td>
</tr>
<tr>
<td style="word-break: normal">The request body could not be parsed as JSON (line: XXX, column: XXX)
</td>
<td style="word-break: normal">The JSON in the request body could not be parsed. The specific line and
column are displayed.</td>
</tr>
<tr>
<td style="word-break: normal">The content type, XXX, is not supported</td>
<td style="word-break: normal">A content type not supported by the API is requested.</td>
</tr>
<tr>
<td style="word-break: normal">Authentication failed due to the following reason: XXX</td>
<td style="word-break: normal">Authentication failed when the API was called. The reason is displayed
for "XXX".</td>
</tr>
<tr>
<td style="word-break: normal">Access to this API is not available for your account</td>
<td style="word-break: normal">Appears when calling an API that you do not have permission to use.</td>
</tr>
<tr>
<td style="word-break: normal">Failed to send messages</td>
<td style="word-break: normal">Appears when the message fails to be sent. One reason this may appear is
if the user ID specified does not exist.</td>
</tr>
<tr>
<td style="word-break: normal">You have reached your monthly limit.</td>
<td style="word-break: normal">You have exceeded the target limit for additional messages.</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Example error response</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="s2">"The request body has 2 error(s)"</span><span class="p">,</span><span class="w">
</span><span class="s2">"details"</span><span class="p">:[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="s2">"May not be empty"</span><span class="p">,</span><span class="w">
</span><span class="s2">"property"</span><span class="p">:</span><span class="s2">"messages[0].text"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="s2">"Must be one of the following values: [text, image, video, audio, location, sticker, template, imagemap]"</span><span class="p">,</span><span class="w">
</span><span class="s2">"property"</span><span class="p">:</span><span class="s2">"messages[1].type"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h2 id="webhooks" class="h2 h2">Webhooks</h2>
<h3 id="introduction" class="h3 h3">Introduction</h3>
<p>When an event, such as when a user adds your LINE official account or sends a message, is triggered, an
HTTPS POST request is sent to the webhook URL that is configured for your channel on the <a
href="/console/">console</a>.</p>
<p>Your bot server then receives and handles the requests.</p>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="request-headers" class="h3 h3">Request headers</h3>
<table class="Table">
<thead class=" nowrap">
<tr>
<th style="word-break: normal">Request header</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="word-break: normal">X-Line-Signature</td>
<td style="word-break: normal">Used for <a href="#signature-validation">signature validation</a>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="request-body" class="h3 h3">Request body</h3>
<p>The request body contains a JSON object with the user ID of a bot that should receive webhook events and an
array of <a href="#webhook-event-objects">webhook event objects</a>.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="word-break: normal">destination</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">User ID of a bot that should receive webhook events. The user ID value is
a string that matches the regular expression, <code>U[0-9a-f]{32}</code>.</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">events</td>
<td style="word-break: normal">Array of <a href="#webhook-event-objects">webhook event objects</a>
</td>
<td style="word-break: normal">Information about the event</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="response" class="h3 h3">Response</h3>
<p>Your bot server should return the status code <code>200</code> for a HTTP POST request sent by a webhook.
</p>
<aside class="notice">
HTTP POST requests sent by a webhook are not resent if the request fails.
</aside>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="signature-validation" class="h3 h3">Signature validation</h3>
<p>The signature in the <code>X-Line-Signature</code> request header must be verified to confirm that the
request was sent from the LINE Platform.</p>
<p>Authentication is performed as follows:</p>
<ol class="decimal">
<li>With the channel secret as the secret key, your application retrieves the digest value in the request
body created using the HMAC-SHA256 algorithm.</li>
<li>The server confirms that the signature in the request header matches the digest value which is Base64
encoded.</li>
</ol>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Example of signature validation</p>
<div class="CodeSwitchBlock">
<pre class="highlight shell js-show" data-code="shell"><code><span class="c"># Click on the language tabs for examples of signature validation</span>
</code></pre>
<pre class="highlight java" data-code="java"><code><span class="n">String</span> <span class="n">channelSecret</span> <span class="o">=</span> <span class="o">...;</span> <span class="c1">// Channel secret string</span>
<span class="n">String</span> <span class="n">httpRequestBody</span> <span class="o">=</span> <span class="o">...;</span> <span class="c1">// Request body string</span>
<span class="n">SecretKeySpec</span> <span class="n">key</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SecretKeySpec</span><span class="o">(</span><span class="n">channelSecret</span><span class="o">.</span><span class="na">getBytes</span><span class="o">(),</span> <span class="s">"HmacSHA256"</span><span class="o">);</span>
<span class="n">Mac</span> <span class="n">mac</span> <span class="o">=</span> <span class="n">Mac</span><span class="o">.</span><span class="na">getInstance</span><span class="o">(</span><span class="s">"HmacSHA256"</span><span class="o">);</span>
<span class="n">mac</span><span class="o">.</span><span class="na">init</span><span class="o">(</span><span class="n">key</span><span class="o">);</span>
<span class="kt">byte</span><span class="o">[]</span> <span class="n">source</span> <span class="o">=</span> <span class="n">httpRequestBody</span><span class="o">.</span><span class="na">getBytes</span><span class="o">(</span><span class="s">"UTF-8"</span><span class="o">);</span>
<span class="n">String</span> <span class="n">signature</span> <span class="o">=</span> <span class="n">Base64</span><span class="o">.</span><span class="na">encodeBase64String</span><span class="o">(</span><span class="n">mac</span><span class="o">.</span><span class="na">doFinal</span><span class="o">(</span><span class="n">source</span><span class="o">));</span>
<span class="c1">// Compare X-Line-Signature request header string and the signature</span>
</code></pre>
<pre class="highlight ruby" data-code="ruby"><code><span class="no">CHANNEL_SECRET</span> <span class="o">=</span> <span class="o">...</span> <span class="c1"># Channel secret string</span>
<span class="n">http_request_body</span> <span class="o">=</span> <span class="n">request</span><span class="p">.</span><span class="nf">raw_post</span> <span class="c1"># Request body string</span>
<span class="nb">hash</span> <span class="o">=</span> <span class="no">OpenSSL</span><span class="o">::</span><span class="no">HMAC</span><span class="o">::</span><span class="n">digest</span><span class="p">(</span><span class="no">OpenSSL</span><span class="o">::</span><span class="no">Digest</span><span class="o">::</span><span class="no">SHA256</span><span class="p">.</span><span class="nf">new</span><span class="p">,</span> <span class="no">CHANNEL_SECRET</span><span class="p">,</span> <span class="n">http_request_body</span><span class="p">)</span>
<span class="n">signature</span> <span class="o">=</span> <span class="no">Base64</span><span class="p">.</span><span class="nf">strict_encode64</span><span class="p">(</span><span class="nb">hash</span><span class="p">)</span>
<span class="c1"># Compare X-Line-Signature request header string and the signature</span>
</code></pre>
<pre class="highlight go" data-code="go"><code><span class="k">defer</span><span class="x"> </span><span class="n">req</span><span class="o">.</span><span class="n">Body</span><span class="o">.</span><span class="n">Close</span><span class="p">()</span><span class="x">
</span><span class="n">body</span><span class="p">,</span><span class="x"> </span><span class="n">err</span><span class="x"> </span><span class="o">:=</span><span class="x"> </span><span class="n">ioutil</span><span class="o">.</span><span class="n">ReadAll</span><span class="p">(</span><span class="n">req</span><span class="o">.</span><span class="n">Body</span><span class="p">)</span><span class="x">
</span><span class="k">if</span><span class="x"> </span><span class="n">err</span><span class="x"> </span><span class="o">!=</span><span class="x"> </span><span class="no">nil</span><span class="x"> </span><span class="p">{</span><span class="x">
</span><span class="c">// ...</span><span class="x">
</span><span class="p">}</span><span class="x">
</span><span class="n">decoded</span><span class="p">,</span><span class="x"> </span><span class="n">err</span><span class="x"> </span><span class="o">:=</span><span class="x"> </span><span class="n">base64</span><span class="o">.</span><span class="n">StdEncoding</span><span class="o">.</span><span class="n">DecodeString</span><span class="p">(</span><span class="n">req</span><span class="o">.</span><span class="n">Header</span><span class="o">.</span><span class="n">Get</span><span class="p">(</span><span class="s">"X-Line-Signature"</span><span class="p">))</span><span class="x">
</span><span class="k">if</span><span class="x"> </span><span class="n">err</span><span class="x"> </span><span class="o">!=</span><span class="x"> </span><span class="no">nil</span><span class="x"> </span><span class="p">{</span><span class="x">
</span><span class="c">// ...</span><span class="x">
</span><span class="p">}</span><span class="x">
</span><span class="n">hash</span><span class="x"> </span><span class="o">:=</span><span class="x"> </span><span class="n">hmac</span><span class="o">.</span><span class="n">New</span><span class="p">(</span><span class="n">sha256</span><span class="o">.</span><span class="n">New</span><span class="p">,</span><span class="x"> </span><span class="p">[]</span><span class="kt">byte</span><span class="p">(</span><span class="s">"&lt;channel secret&gt;"</span><span class="p">))</span><span class="x">
</span><span class="n">hash</span><span class="o">.</span><span class="n">Write</span><span class="p">(</span><span class="n">body</span><span class="p">)</span><span class="x">
</span><span class="c">// Compare decoded signature and `hash.Sum(nil)` by using `hmac.Equal`</span><span class="x">
</span></code></pre>
<pre class="highlight php" data-code="php"><code><span class="nv">$channelSecret</span> <span class="o">=</span> <span class="o">...</span><span class="p">;</span> <span class="c1">// Channel secret string
</span><span class="nv">$httpRequestBody</span> <span class="o">=</span> <span class="o">...</span><span class="p">;</span> <span class="c1">// Request body string
</span><span class="nv">$hash</span> <span class="o">=</span> <span class="nb">hash_hmac</span><span class="p">(</span><span class="s1">'sha256'</span><span class="p">,</span> <span class="nv">$httpRequestBody</span><span class="p">,</span> <span class="nv">$channelSecret</span><span class="p">,</span> <span class="kc">true</span><span class="p">);</span>
<span class="nv">$signature</span> <span class="o">=</span> <span class="nb">base64_encode</span><span class="p">(</span><span class="nv">$hash</span><span class="p">);</span>
<span class="c1">// Compare X-Line-Signature request header string and the signature
</span></code></pre>
<pre class="highlight perl" data-code="perl"><code><span class="k">use</span> <span class="nn">Digest::</span><span class="nv">SHA</span> <span class="s">'hmac_sha256'</span><span class="p">;</span>
<span class="k">use</span> <span class="nn">MIME::</span><span class="nv">Base64</span> <span class="s">'encode_base64'</span><span class="p">;</span>
<span class="k">my</span> <span class="nv">$channel_secret</span><span class="o">=</span> <span class="o">...</span> <span class="c1"># Channel secret string</span>
<span class="k">my</span> <span class="nv">$http_body</span> <span class="o">=</span> <span class="o">...</span> <span class="c1"># Request body string</span>
<span class="k">my</span> <span class="nv">$signature</span> <span class="o">=</span> <span class="nv">encode_base64</span><span class="p">(</span><span class="nv">hmac_sha256</span><span class="p">(</span><span class="nv">$http_body</span><span class="p">,</span> <span class="nv">$channel_secret</span><span class="p">));</span>
<span class="c1"># Compare X-Line-Signature request header string and the signature</span>
</code></pre>
<pre class="highlight python" data-code="python"><code><span class="kn">import</span> <span class="nn">base64</span>
<span class="kn">import</span> <span class="nn">hashlib</span>
<span class="kn">import</span> <span class="nn">hmac</span>
<span class="n">channel_secret</span> <span class="o">=</span> <span class="o">...</span> <span class="c"># Channel secret string</span>
<span class="n">body</span> <span class="o">=</span> <span class="o">...</span> <span class="c"># Request body string</span>
<span class="nb">hash</span> <span class="o">=</span> <span class="n">hmac</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">channel_secret</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s">'utf-8'</span><span class="p">),</span>
<span class="n">body</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s">'utf-8'</span><span class="p">),</span> <span class="n">hashlib</span><span class="o">.</span><span class="n">sha256</span><span class="p">)</span><span class="o">.</span><span class="n">digest</span><span class="p">()</span>
<span class="n">signature</span> <span class="o">=</span> <span class="n">base64</span><span class="o">.</span><span class="n">b64encode</span><span class="p">(</span><span class="nb">hash</span><span class="p">)</span>
<span class="c"># Compare X-Line-Signature request header and the signature</span>
</code></pre>
<pre class="highlight javascript" data-code="nodejs"><code><span class="kd">const</span> <span class="nx">crypto</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">'crypto'</span><span class="p">);</span>
<span class="kd">const</span> <span class="nx">channelSecret</span> <span class="o">=</span> <span class="p">...;</span> <span class="c1">// Channel secret string</span>
<span class="kd">const</span> <span class="nx">body</span> <span class="o">=</span> <span class="p">...;</span> <span class="c1">// Request body string</span>
<span class="kd">const</span> <span class="nx">signature</span> <span class="o">=</span> <span class="nx">crypto</span>
<span class="p">.</span><span class="nx">createHmac</span><span class="p">(</span><span class="s1">'SHA256'</span><span class="p">,</span> <span class="nx">channelSecret</span><span class="p">)</span>
<span class="p">.</span><span class="nx">update</span><span class="p">(</span><span class="nx">body</span><span class="p">).</span><span class="nx">digest</span><span class="p">(</span><span class="s1">'base64'</span><span class="p">);</span>
<span class="c1">// Compare X-Line-Signature request header and the signature</span>
</code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h2 id="webhook-event-objects" class="h2 h2">Webhook event objects</h2>
<p>JSON objects which contain events generated on the LINE Platform.</p>
<ul>
<li>
<a href="#common-properties">Common properties</a>
<ul>
<li><a href="#source-user">Source user</a></li>
<li><a href="#source-group">Source group</a></li>
<li><a href="#source-room">Source room</a></li>
</ul>
</li>
<li>
<a href="#message-event">Message event</a>
<ul>
<li><a href="#wh-text">Text</a></li>
<li><a href="#wh-image">Image</a></li>
<li><a href="#wh-video">Video</a></li>
<li><a href="#wh-audio">Audio</a></li>
<li><a href="#wh-file">File</a></li>
<li><a href="#wh-location">Location</a></li>
<li><a href="#wh-sticker">Sticker</a></li>
</ul>
</li>
<li><a href="#follow-event">Follow event</a></li>
<li><a href="#unfollow-event">Unfollow event</a></li>
<li><a href="#join-event">Join event</a></li>
<li><a href="#leave-event">Leave event</a></li>
<li><a href="#member-joined-event">Member join event</a></li>
<li><a href="#member-left-event">Member leave event</a></li>
<li><a href="#postback-event">Postback event</a></li>
<li><a href="#beacon-event">Beacon event</a></li>
<li><a href="#account-link-event">Account link event</a></li>
<li><a href="#device-link-event">Device link event</a></li>
<li><a href="#device-unlink-event">Device unlink event</a></li>
<li><a href="#scenario-result-event">LINE Things scenario execution event</a></li>
</ul>
<p>Some properties of these event objects might not have any value. Generated event objects don't contain
properties without any value.</p>
<p>The structure of these event objects might be changed when the Messaging API feature is updated. Such
changes can include adding properties, changing the order of properties, adding or deleting spaces and
newlines between data elements, and so on. Implement your server so as not to fail in receiving event
objects whose structure has changed in the future.</p>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Example webhook event object</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"destination"</span><span class="p">:</span><span class="w"> </span><span class="s2">"xxxxxxxxxx"</span><span class="p">,</span><span class="w">
</span><span class="s2">"events"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0f3779fba3b349968c5d07db31eab56f"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"message"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"325708"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"text"</span><span class="p">,</span><span class="w">
</span><span class="s2">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hello, world"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"8cf9239d56244f4197887e939187e19e"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"follow"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="common-properties" class="h3 h3">Common properties</h3>
<p>The following properties are found in webhook event objects.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Identifier for the type of event</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">timestamp</td>
<td class=" nowrap" style="word-break: normal">Number</td>
<td style="word-break: normal">Time of the event in milliseconds</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">source</td>
<td class=" nowrap" style="word-break: normal">Object</td>
<td style="word-break: normal">Source <a href="#source-user">user</a>, <a
href="#source-group">group</a>, or <a href="#source-room">room</a> object with information about the
source of the event.</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="source-user" class="h4 h4">Source user</h4>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>user</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">userId</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">ID of the source user</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Source user example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="w"> </span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="source-group" class="h4 h4">Source group</h4>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>group</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">groupId</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">ID of the source group</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">userId</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">ID of the source user. Only included in <a href="#message-event">message
events</a>. Users of LINE version 7.4.x or earlier are not included in <code>userId</code>. For more
information, see <a href="/en/docs/messaging-api/user-consent/">User consent</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Source group example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="w"> </span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"group"</span><span class="p">,</span><span class="w">
</span><span class="s2">"groupId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Ca56f94637c..."</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="source-room" class="h4 h4">Source room</h4>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>room</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">roomId</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">ID of the source room</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">userId</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">ID of the source user. Only included in <a href="#message-event">message
events</a>. Users of LINE version 7.4.x or earlier are not included in <code>userId</code>. For more
information, see <a href="/en/docs/messaging-api/user-consent/">User consent</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Source room example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="w"> </span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"room"</span><span class="p">,</span><span class="w">
</span><span class="s2">"roomId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Ra8dbf4673c..."</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="message-event" class="h3 h3">Message event</h3>
<p>Webhook event object which contains the sent message.
The <code>message</code> property contains a message object which corresponds with the message type. You can
reply to message events.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>message</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">replyToken</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Token for replying to the event</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">message</td>
<td class=" nowrap" style="word-break: normal">Object</td>
<td style="word-break: normal">Object containing the contents of the message. Message types include:
<ul>
<li><a href="#wh-text">Text</a></li>
<li><a href="#wh-image">Image</a></li>
<li><a href="#wh-video">Video</a></li>
<li><a href="#wh-audio">Audio</a></li>
<li><a href="#wh-file">File</a></li>
<li><a href="#wh-location">Location</a></li>
<li><a href="#wh-sticker">Sticker</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="wh-text" class="h4 h4">Text</h4>
<p>Message object which contains the text sent from the source.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">id</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Message ID</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>text</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">text</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Message text</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Text message example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"message"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"325708"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"text"</span><span class="p">,</span><span class="w">
</span><span class="s2">"text"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Hello, world!"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="wh-image" class="h4 h4">Image</h4>
<p>Message object which contains the image content sent from the source.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">id</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Message ID</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>image</code></td>
</tr>
<tr>
<td style="word-break: normal">contentProvider.type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Provider of the image file.
<ul>
<li>
<code>line</code>: The image was sent by a LINE user. The binary image data can be retrieved from
the <a href="#get-content"><code>content</code></a> endpoint.</li>
<li>
<code>external</code>: The image was sent using the LIFF <code>liff.sendMessages()</code> method.
For more information, see <a href="/en/reference/liff/#send-messages">liff.sendMessages()</a> in
the LIFF API reference.</li>
</ul>
</td>
</tr>
<tr>
<td style="word-break: normal">contentProvider.originalContentUrl</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">URL of the image file. Only included when contentProvider.type is
<code>external</code>.</td>
</tr>
<tr>
<td style="word-break: normal">contentProvider.previewImageUrl</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">URL of the preview image. Only included when contentProvider.type is
<code>external</code>.</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Image message example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"message"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"325708"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"image"</span><span class="p">,</span><span class="w">
</span><span class="s2">"contentProvider"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"line"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="wh-video" class="h4 h4">Video</h4>
<p>Message object which contains the video content sent from the source. The preview image is displayed in the
chat and the video is played when the image is tapped.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">id</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Message ID</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>video</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">duration</td>
<td class=" nowrap" style="word-break: normal">Number</td>
<td style="word-break: normal">Length of video file (milliseconds)</td>
</tr>
<tr>
<td style="word-break: normal">contentProvider.type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Provider of the video file.
<ul>
<li>
<code>line</code>: The video was sent by a LINE user. The binary video data can be retrieved from
the <a href="#get-content"><code>content</code></a> endpoint.</li>
<li>
<code>external</code>: The video was sent using the LIFF <code>liff.sendMessages()</code> method.
For more information, see <a href="/en/reference/liff/#send-messages">liff.sendMessages()</a> in
the LIFF API reference.</li>
</ul>
</td>
</tr>
<tr>
<td style="word-break: normal">contentProvider.originalContentUrl</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">URL of the video file. Only included when contentProvider.type is
<code>external</code>.</td>
</tr>
<tr>
<td style="word-break: normal">contentProvider.previewImageUrl</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">URL of the preview image. Only included when contentProvider.type is
<code>external</code>.</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Video message example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"message"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"325708"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"video"</span><span class="p">,</span><span class="w">
</span><span class="s2">"duration"</span><span class="p">:</span><span class="w"> </span><span class="mi">60000</span><span class="p">,</span><span class="w">
</span><span class="s2">"contentProvider"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"external"</span><span class="p">,</span><span class="w">
</span><span class="s2">"originalContentUrl"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://example.com/original.mp4"</span><span class="p">,</span><span class="w">
</span><span class="s2">"previewImageUrl"</span><span class="p">:</span><span class="w"> </span><span class="s2">"https://example.com/preview.jpg"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="wh-audio" class="h4 h4">Audio</h4>
<p>Message object which contains the audio content sent from the source.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">id</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Message ID</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>audio</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">duration</td>
<td class=" nowrap" style="word-break: normal">Number</td>
<td style="word-break: normal">Length of audio file (milliseconds)</td>
</tr>
<tr>
<td style="word-break: normal">contentProvider.type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Provider of the audio file.
<ul>
<li>
<code>line</code>: The audio file was sent by a LINE user. The binary audio data can be retrieved
from the <a href="#get-content"><code>content</code></a> endpoint.</li>
<li>
<code>external</code>: The audio file was sent using the LIFF <code>liff.sendMessages()</code>
method. For more information, see <a
href="/en/reference/liff/#send-messages">liff.sendMessages()</a> in the LIFF API reference.</li>
</ul>
</td>
</tr>
<tr>
<td style="word-break: normal">contentProvider.originalContentUrl</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">URL of the audio file. Only included when contentProvider.type is
<code>external</code>.</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Audio message example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"message"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"325708"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"audio"</span><span class="p">,</span><span class="w">
</span><span class="s2">"duration"</span><span class="p">:</span><span class="w"> </span><span class="mi">60000</span><span class="p">,</span><span class="w">
</span><span class="s2">"contentProvider"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"line"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="wh-file" class="h4 h4">File</h4>
<p>Message object which contains the file sent from the source. The binary data can be retrieved from the <a
href="#get-content"><code>content</code></a> endpoint.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">id</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Message ID</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>file</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">fileName</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">File name</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">fileSize</td>
<td class=" nowrap" style="word-break: normal">Number</td>
<td style="word-break: normal">File size in bytes</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> File message example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"message"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"325708"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"file"</span><span class="p">,</span><span class="w">
</span><span class="s2">"fileName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"file.txt"</span><span class="p">,</span><span class="w">
</span><span class="s2">"fileSize"</span><span class="p">:</span><span class="w"> </span><span class="mi">2138</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="wh-location" class="h4 h4">Location</h4>
<p>Message object which contains the location data sent from the source.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">id</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Message ID</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>location</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">title</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Title</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">address</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Address</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">latitude</td>
<td class=" nowrap" style="word-break: normal">Decimal</td>
<td class=" nowrap" style="word-break: normal">Latitude</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">longitude</td>
<td class=" nowrap" style="word-break: normal">Decimal</td>
<td class=" nowrap" style="word-break: normal">Longitude</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Location message example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"message"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"325708"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"location"</span><span class="p">,</span><span class="w">
</span><span class="s2">"title"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my location"</span><span class="p">,</span><span class="w">
</span><span class="s2">"address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"〒150-0002 東京都渋谷區渋谷2丁目21−1"</span><span class="p">,</span><span class="w">
</span><span class="s2">"latitude"</span><span class="p">:</span><span class="w"> </span><span class="mf">35.65910807942215</span><span class="p">,</span><span class="w">
</span><span class="s2">"longitude"</span><span class="p">:</span><span class="w"> </span><span class="mf">139.70372892916203</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h4 id="wh-sticker" class="h4 h4">Sticker</h4>
<p>Message object which contains the sticker data sent from the source.
For a list of basic LINE stickers and sticker IDs, see <a
href="/media/messaging-api/sticker_list.pdf">sticker list</a>.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">id</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Message ID</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>sticker</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">packageId</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Package ID</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">stickerId</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal">Sticker ID</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Sticker message example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"message"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"message"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"325708"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"sticker"</span><span class="p">,</span><span class="w">
</span><span class="s2">"packageId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="p">,</span><span class="w">
</span><span class="s2">"stickerId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="follow-event" class="h3 h3">Follow event</h3>
<p>Event object for when your LINE official account is added as a friend (or unblocked). You can reply to
follow events.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>follow</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">replyToken</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Token for replying to this event</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Follow event example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"follow"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="unfollow-event" class="h3 h3">Unfollow event</h3>
<p>Event object for when your LINE official account is blocked.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>unfollow</code></td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Unfollow event example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"unfollow"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="join-event" class="h3 h3">Join event</h3>
<p>Event object for when your LINE official account joins a group or room. You can reply to join events.</p>
<p>A join event is triggered at different times for groups and rooms. </p>
<ul>
<li>For groups: A join event is sent when a user invites your LINE official account. </li>
<li>For rooms: A join event is sent when the first event (for example when a user sends a message or is
added to the room) occurs after your LINE official account is added.</li>
</ul>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>join</code></td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">replyToken</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Token for replying to this event</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Join event example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"join"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"group"</span><span class="p">,</span><span class="w">
</span><span class="s2">"groupId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"C4af4980629..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="leave-event" class="h3 h3">Leave event</h3>
<p>Event object for when a user removes your LINE official account from a <a
href="/en/docs/messaging-api/group-chats/#group">group</a> or when your LINE official account leaves a <a
href="/en/docs/messaging-api/group-chats/#group">group</a> or <a
href="/en/docs/messaging-api/group-chats/#room">room</a>.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td class=" nowrap" style="word-break: normal"><code>leave</code></td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Leave event example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"leave"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"group"</span><span class="p">,</span><span class="w">
</span><span class="s2">"groupId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"C4af4980629..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="member-joined-event" class="h3 h3">Member join event</h3>
<p>Event object for when a user joins a <a href="/en/docs/messaging-api/group-chats/#group">group</a> or <a
href="/en/docs/messaging-api/group-chats/#room">room</a> that the LINE official account is in.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class=" nowrap" style="word-break: normal">type</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal"><code>memberJoined</code></td>
</tr>
<tr>
<td style="word-break: normal">joined.members</td>
<td style="word-break: normal">Array of <a href="#source-user">source user</a> objects</td>
<td style="word-break: normal">User ID of users who joined</td>
</tr>
<tr>
<td class=" nowrap" style="word-break: normal">replyToken</td>
<td class=" nowrap" style="word-break: normal">String</td>
<td style="word-break: normal">Token for replying to this event</td>
</tr>
</tbody>
</table>
</div>
<div class="SectionReference_Code">
<p class="SectionReference_CodeTitle"> Member join event example</p>
<div class="CodeSwitchBlock">
<pre class="highlight json js-show" data-code="plaintext"><code><span class="p">{</span><span class="w">
</span><span class="s2">"replyToken"</span><span class="p">:</span><span class="w"> </span><span class="s2">"0f3779fba3b349968c5d07db31eabf65"</span><span class="p">,</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"memberJoined"</span><span class="p">,</span><span class="w">
</span><span class="s2">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="mi">1462629479859</span><span class="p">,</span><span class="w">
</span><span class="s2">"source"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"group"</span><span class="p">,</span><span class="w">
</span><span class="s2">"groupId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"C4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="s2">"joined"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"members"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U4af4980629..."</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="s2">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span class="w">
</span><span class="s2">"userId"</span><span class="p">:</span><span class="w"> </span><span class="s2">"U91eeaf62d9..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
</div>
</div>
</section>
<section class="SectionReference SectionReference-hasSide">
<div class="SectionReference_Spec">
<h3 id="member-left-event" class="h3 h3">Member leave event</h3>
<p>Event object for when a user leaves a <a href="/en/docs/messaging-api/group-chats/#group">group</a> or <a
href="/en/docs/messaging-api/group-chats/#room">room</a> that the LINE official account is in.</p>
<table class="Table">
<thead class=" nowrap">
<tr>
<th class=" nowrap" style="word-break: normal">Property</th>
<th class=" nowrap" style="word-break: normal">Type</th>
<th style="word-break: normal">Description</th>
</tr