[{"data":1,"prerenderedAt":864},["ShallowReactive",2],{"h3776821175":3,"h311211468":539,"h4151261687":851},{"id":4,"title":5,"body":6,"description":28,"extension":530,"meta":531,"navigation":534,"path":535,"seo":536,"stem":537,"__hash__":538},"docs\u002Fen\u002Ftips\u002F2026\u002F11\u002F12\u002Fmessaging-api-postman.md","How to test the Messaging API on Postman using LINE OpenAPI",{"type":7,"value":8,"toc":497},"minimark",[9],[10,11,12,20,25,29,45,48,51,56,59,95,98,102,105,110,113,123,131,140,144,147,179,188,191,195,202,213,228,232,235,238,286,292,295,299,302,308,312,315,326,330,338,461,467,477,481,484,487,491],"Tips",{},[13,14,17],"h1",{"id":15,"class":16},"","!mb-4",[18,19],"page-title",{},[21,22],"display-date",{"date":23,"class":24},"2026\u002F11\u002F12","!mb-20",[26,27,28],"p",{},"Hello! I'm Zenigami, a technical writer. When you start developing with the Messaging API, have you ever thought, \"I want to test how the API works before writing any code\"?",[26,30,31,38,39,44],{},[32,33,37],"a",{"href":34,"rel":35},"https:\u002F\u002Fwww.postman.com\u002F",[36],"nofollow","Postman"," is widely used as a tool to easily test APIs via a GUI. By using our officially provided ",[32,40,43],{"href":41,"rel":42},"https:\u002F\u002Fgithub.com\u002Fline\u002Fline-openapi",[36],"LINE OpenAPI",", you can save yourself the trouble of manually setting endpoints, request bodies, and other details, allowing you to test the API much more smoothly.",[26,46,47],{},"In this post, I will explain the steps from importing the LINE OpenAPI specification file into Postman to actually sending a push message using the Messaging API.",[49,50],"toc",{},[52,53,55],"h2",{"id":54},"environment","Environment",[26,57,58],{},"I have verified the steps in this post using the following environment:",[60,61,62,75],"table",{},[63,64,65],"thead",{},[66,67,68,72],"tr",{},[69,70,71],"th",{},"Name",[69,73,74],{},"Version",[76,77,78,87],"tbody",{},[66,79,80,84],{},[81,82,83],"td",{},"OS",[81,85,86],{},"macOS 26.3.1",[66,88,89,92],{},[81,90,91],{},"Postman app",[81,93,94],{},"12.34.4",[26,96,97],{},"The steps shown below may differ depending on your OS or Postman version.",[52,99,101],{"id":100},"steps","Steps",[26,103,104],{},"Below are the steps for sending a push message using the Messaging API with Postman.",[106,107,109],"h3",{"id":108},"line-openapi","1. Get the URL of the LINE OpenAPI specification file",[26,111,112],{},"First, get the URL of the LINE OpenAPI specification file. The OpenAPI specifications for various APIs, including the Messaging API, are published on our GitHub repository.",[114,115,116],"ul",{},[117,118,119],"li",{},[32,120,122],{"href":41,"rel":121},[36],"line\u002Fline-openapi",[26,124,125,126,130],{},"To test the Messaging API, you will use ",[127,128,129],"code",{},"messaging-api.yml"," in the repository. Copy the URL of the file shown below:",[132,133,138],"pre",{"className":134,"code":136,"language":137},[135],"language-text","https:\u002F\u002Fraw.githubusercontent.com\u002Fline\u002Fline-openapi\u002Frefs\u002Fheads\u002Fmain\u002Fmessaging-api.yml\n","text",[127,139,136],{"__ignoreMap":15},[106,141,143],{"id":142},"import","2. Import into Postman",[26,145,146],{},"Once you have the file URL, the next step is to load it into Postman. You can do this by following these steps:",[148,149,150,162,168],"ol",{},[117,151,152,153,157,158,161],{},"Open Postman, and click ",[154,155,156],"strong",{},"Import"," in the ",[154,159,160],{},"File"," menu.",[117,163,164,165,167],{},"Paste the copied OpenAPI specification URL, and click ",[154,166,156],{},".",[117,169,170,171,174,175,178],{},"Once the import is complete, a collection named ",[127,172,173],{},"LINE Messaging API"," will be created under ",[154,176,177],{},"Collections"," on the left.",[26,180,181],{},[182,183],"img",{"alt":15,"className":184,"src":187},[185,186],"border","w-fix-640","\u002Fmedia\u002Ftips\u002F2026\u002Fpostman-import.png",[26,189,190],{},"The structure of each Messaging API endpoint, including URLs, parameters, and request bodies, is now automatically configured in Postman.",[106,192,194],{"id":193},"get-channel-access-token","3. Get a channel access token",[26,196,197,198,167],{},"To execute the Messaging API, you need to set a channel access token. For the purpose of verifying how the API works, it is convenient to use a ",[32,199,201],{"href":200},"\u002Fdocs\u002Fbasics\u002Fchannel-access-token\u002F#long-lived-channel-access-token","long-lived channel access token",[26,203,204,205,208,209,167],{},"You can issue a long-lived channel access token from the ",[154,206,207],{},"Messaging API"," tab of your Messaging API channel in the ",[32,210,212],{"href":211},"\u002Fconsole\u002F","LINE Developers Console",[214,215,218,221],"admonition",{"title":216,"type":217},"Use the steps in this post for API testing purposes only","note",[26,219,220],{},"Long-lived channel access tokens are convenient and easy to issue from the LINE Developers Console. However, because they have no expiration date, they carry a high risk if leaked. Additionally, depending on how variables are configured in Postman, the values you enter may be saved on its cloud servers.",[26,222,223,224,167],{},"Use the Postman procedures introduced in this post solely for verifying API operations. In actual production environments, execute the API from your program using other types of tokens, such as ",[32,225,227],{"href":226},"\u002Fdocs\u002Fbasics\u002Fchannel-access-token\u002F#stateless-channel-access-token","stateless channel access tokens",[106,229,231],{"id":230},"set-channel-access-token","4. Set the channel access token",[26,233,234],{},"The channel access token you obtained in step 3 must be set in the request header. By setting it as a variable for the entire collection, you can execute the API efficiently.",[26,236,237],{},"To set it as a collection variable, follow these steps:",[148,239,240,246,253,264,277],{},[117,241,242,243,245],{},"Click the ",[154,244,173],{}," collection.",[117,247,248,249,252],{},"Open the ",[154,250,251],{},"Variables"," tab on the right.",[117,254,255,256,259,260,263],{},"Add a variable named ",[127,257,258],{},"channelAccessToken",", and enter your channel access token in the ",[154,261,262],{},"Value"," field.",[117,265,248,266,269,270,273,274,167],{},[154,267,268],{},"Authorization"," tab, and set the ",[154,271,272],{},"Auth type"," to ",[127,275,276],{},"Bearer Token",[117,278,279,280,157,283,263],{},"Enter ",[127,281,282],{},"{{channelAccessToken}}",[154,284,285],{},"Token",[26,287,288],{},[182,289],{"alt":15,"className":290,"src":291},[185,186],"\u002Fmedia\u002Ftips\u002F2026\u002Fpostman-channel-access-token.png",[26,293,294],{},"This will automatically add the authorization header to all requests within the collection.",[106,296,298],{"id":297},"add-friend","5. Add the LINE Official Account as a friend",[26,300,301],{},"Later, you will send a push message using the Messaging API. To receive the message on the LINE app, you need to be friends with the LINE Official Account that will send the message.",[26,303,304,305,307],{},"If you haven't added it as a friend yet, scan the QR code found on the ",[154,306,207],{}," tab of the LINE Developers Console using your LINE app to add it.",[106,309,311],{"id":310},"get-user-id","6. Get the destination user ID",[26,313,314],{},"Next, get the user ID that will be the destination of the push message.",[26,316,317,318,321,322,325],{},"You can find your user ID, which will be the destination, under ",[154,319,320],{},"Your user ID"," at the bottom of the ",[154,323,324],{},"Basic settings"," tab in the LINE Developers Console. Copy this user ID.",[106,327,329],{"id":328},"push-message","7. Try sending a push message",[26,331,332,333,337],{},"You are now ready to try out the Messaging API. Here, as a test, let's try sending a ",[32,334,336],{"href":335},"\u002Freference\u002Fmessaging-api\u002F#send-push-message","push message"," to yourself. Send a message by following these steps:",[148,339,340,352,455],{},[117,341,342,343,345,346],{},"Select the push message request from the ",[154,344,173],{}," collection:",[132,347,350],{"className":348,"code":349,"language":137},[135],"v2 > bot > message > push > push Message\n",[127,351,349],{"__ignoreMap":15},[117,353,248,354,357,358,361,362,364,365],{},[154,355,356],{},"Body"," tab and rewrite the request body as follows. For ",[127,359,360],{},"to",", specify ",[154,363,320],{}," that you copied in step 6.",[132,366,370],{"className":367,"code":368,"language":369,"meta":15,"style":15},"language-json shiki shiki-themes github-dark-default","{\n  \"to\": \"\u003CYour user ID>\",\n  \"messages\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"Hello, world!\"\n    }\n  ]\n}\n","json",[127,371,372,381,398,407,413,426,437,443,449],{"__ignoreMap":15},[373,374,377],"span",{"class":375,"line":376},"line",1,[373,378,380],{"class":379},"sZEs4","{\n",[373,382,384,388,391,395],{"class":375,"line":383},2,[373,385,387],{"class":386},"sPWt5","  \"to\"",[373,389,390],{"class":379},": ",[373,392,394],{"class":393},"s9uIt","\"\u003CYour user ID>\"",[373,396,397],{"class":379},",\n",[373,399,401,404],{"class":375,"line":400},3,[373,402,403],{"class":386},"  \"messages\"",[373,405,406],{"class":379},": [\n",[373,408,410],{"class":375,"line":409},4,[373,411,412],{"class":379},"    {\n",[373,414,416,419,421,424],{"class":375,"line":415},5,[373,417,418],{"class":386},"      \"type\"",[373,420,390],{"class":379},[373,422,423],{"class":393},"\"text\"",[373,425,397],{"class":379},[373,427,429,432,434],{"class":375,"line":428},6,[373,430,431],{"class":386},"      \"text\"",[373,433,390],{"class":379},[373,435,436],{"class":393},"\"Hello, world!\"\n",[373,438,440],{"class":375,"line":439},7,[373,441,442],{"class":379},"    }\n",[373,444,446],{"class":375,"line":445},8,[373,447,448],{"class":379},"  ]\n",[373,450,452],{"class":375,"line":451},9,[373,453,454],{"class":379},"}\n",[117,456,242,457,460],{},[154,458,459],{},"Send"," button.",[26,462,463],{},[182,464],{"alt":15,"className":465,"src":466},[185,186],"\u002Fmedia\u002Ftips\u002F2026\u002Fpostman-send-push-message.png",[26,468,469,470,473,474,476],{},"If ",[127,471,472],{},"200 OK"," is displayed in the response section at the bottom after you click the ",[154,475,459],{}," button, the request was successful. If you open your LINE app, you should see that the message has arrived.",[52,478,480],{"id":479},"conclusion","Conclusion",[26,482,483],{},"By combining LINE OpenAPI and Postman, you no longer need to manually type URLs and parameters while looking at the API reference, allowing you to easily try out the Messaging API.",[26,485,486],{},"The Messaging API has various endpoints, such as those for managing rich menus and audiences. Using this method, you can quickly test them out on your end. I hope you find this useful for streamlining your day-to-day development and testing.",[488,489,490],"style",{},"html pre.shiki code .sZEs4, html code.shiki .sZEs4{--shiki-default:#E6EDF3}html pre.shiki code .sPWt5, html code.shiki .sPWt5{--shiki-default:#7EE787}html pre.shiki code .s9uIt, html code.shiki .s9uIt{--shiki-default:#A5D6FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",[492,493],"tags",{"tags":494,"lang":495,"section":496},"messaging-api","en","tips",{"title":15,"searchDepth":409,"depth":415,"links":498},[499,502,527],{"id":500,"depth":383,"text":501},"environment-environment","Environment {#environment}",{"id":503,"depth":383,"text":504,"children":505},"steps-steps","Steps {#steps}",[506,509,512,515,518,521,524],{"id":507,"depth":400,"text":508},"_1-get-the-url-of-the-line-openapi-specification-file-line-openapi","1. Get the URL of the LINE OpenAPI specification file {#line-openapi}",{"id":510,"depth":400,"text":511},"_2-import-into-postman-import","2. Import into Postman {#import}",{"id":513,"depth":400,"text":514},"_3-get-a-channel-access-token-get-channel-access-token","3. Get a channel access token {#get-channel-access-token}",{"id":516,"depth":400,"text":517},"_4-set-the-channel-access-token-set-channel-access-token","4. Set the channel access token {#set-channel-access-token}",{"id":519,"depth":400,"text":520},"_5-add-the-line-official-account-as-a-friend-add-friend","5. Add the LINE Official Account as a friend {#add-friend}",{"id":522,"depth":400,"text":523},"_6-get-the-destination-user-id-get-user-id","6. Get the destination user ID {#get-user-id}",{"id":525,"depth":400,"text":526},"_7-try-sending-a-push-message-push-message","7. Try sending a push message {#push-message}",{"id":528,"depth":383,"text":529},"conclusion-conclusion","Conclusion {#conclusion}","md",{"date":532,"tags":494,"locale":495,"sidebar":533},"2026-11-12 00:00 UTC",false,true,"\u002Fen\u002Ftips\u002F2026\u002F11\u002F12\u002Fmessaging-api-postman",{"title":5,"description":28},"en\u002Ftips\u002F2026\u002F11\u002F12\u002Fmessaging-api-postman","DhMFwQrpRs_uGtdedxsPOp0obXFy5jCsrzHZfk3yMnM",{"id":4,"title":5,"body":540,"description":28,"extension":530,"meta":849,"navigation":534,"path":535,"seo":850,"stem":537,"__hash__":538},{"type":7,"value":541,"toc":836},[542],[10,543,544,548,550,552,560,562,564,566,568,592,594,596,598,600,602,609,613,618,620,622,640,645,647,649,653,659,667,669,671,673,703,708,710,712,714,718,720,722,728,730,734,815,820,826,828,830,832,834],{},[13,545,546],{"id":15,"class":16},[18,547],{},[21,549],{"date":23,"class":24},[26,551,28],{},[26,553,554,38,557,44],{},[32,555,37],{"href":34,"rel":556},[36],[32,558,43],{"href":41,"rel":559},[36],[26,561,47],{},[49,563],{},[52,565,55],{"id":54},[26,567,58],{},[60,569,570,578],{},[63,571,572],{},[66,573,574,576],{},[69,575,71],{},[69,577,74],{},[76,579,580,586],{},[66,581,582,584],{},[81,583,83],{},[81,585,86],{},[66,587,588,590],{},[81,589,91],{},[81,591,94],{},[26,593,97],{},[52,595,101],{"id":100},[26,597,104],{},[106,599,109],{"id":108},[26,601,112],{},[114,603,604],{},[117,605,606],{},[32,607,122],{"href":41,"rel":608},[36],[26,610,125,611,130],{},[127,612,129],{},[132,614,616],{"className":615,"code":136,"language":137},[135],[127,617,136],{"__ignoreMap":15},[106,619,143],{"id":142},[26,621,146],{},[148,623,624,630,634],{},[117,625,152,626,157,628,161],{},[154,627,156],{},[154,629,160],{},[117,631,164,632,167],{},[154,633,156],{},[117,635,170,636,174,638,178],{},[127,637,173],{},[154,639,177],{},[26,641,642],{},[182,643],{"alt":15,"className":644,"src":187},[185,186],[26,646,190],{},[106,648,194],{"id":193},[26,650,197,651,167],{},[32,652,201],{"href":200},[26,654,204,655,208,657,167],{},[154,656,207],{},[32,658,212],{"href":211},[214,660,661,663],{"title":216,"type":217},[26,662,220],{},[26,664,223,665,167],{},[32,666,227],{"href":226},[106,668,231],{"id":230},[26,670,234],{},[26,672,237],{},[148,674,675,679,683,689,697],{},[117,676,242,677,245],{},[154,678,173],{},[117,680,248,681,252],{},[154,682,251],{},[117,684,255,685,259,687,263],{},[127,686,258],{},[154,688,262],{},[117,690,248,691,269,693,273,695,167],{},[154,692,268],{},[154,694,272],{},[127,696,276],{},[117,698,279,699,157,701,263],{},[127,700,282],{},[154,702,285],{},[26,704,705],{},[182,706],{"alt":15,"className":707,"src":291},[185,186],[26,709,294],{},[106,711,298],{"id":297},[26,713,301],{},[26,715,304,716,307],{},[154,717,207],{},[106,719,311],{"id":310},[26,721,314],{},[26,723,317,724,321,726,325],{},[154,725,320],{},[154,727,324],{},[106,729,329],{"id":328},[26,731,332,732,337],{},[32,733,336],{"href":335},[148,735,736,745,811],{},[117,737,342,738,345,740],{},[154,739,173],{},[132,741,743],{"className":742,"code":349,"language":137},[135],[127,744,349],{"__ignoreMap":15},[117,746,248,747,357,749,361,751,364,753],{},[154,748,356],{},[127,750,360],{},[154,752,320],{},[132,754,755],{"className":367,"code":368,"language":369,"meta":15,"style":15},[127,756,757,761,771,777,781,791,799,803,807],{"__ignoreMap":15},[373,758,759],{"class":375,"line":376},[373,760,380],{"class":379},[373,762,763,765,767,769],{"class":375,"line":383},[373,764,387],{"class":386},[373,766,390],{"class":379},[373,768,394],{"class":393},[373,770,397],{"class":379},[373,772,773,775],{"class":375,"line":400},[373,774,403],{"class":386},[373,776,406],{"class":379},[373,778,779],{"class":375,"line":409},[373,780,412],{"class":379},[373,782,783,785,787,789],{"class":375,"line":415},[373,784,418],{"class":386},[373,786,390],{"class":379},[373,788,423],{"class":393},[373,790,397],{"class":379},[373,792,793,795,797],{"class":375,"line":428},[373,794,431],{"class":386},[373,796,390],{"class":379},[373,798,436],{"class":393},[373,800,801],{"class":375,"line":439},[373,802,442],{"class":379},[373,804,805],{"class":375,"line":445},[373,806,448],{"class":379},[373,808,809],{"class":375,"line":451},[373,810,454],{"class":379},[117,812,242,813,460],{},[154,814,459],{},[26,816,817],{},[182,818],{"alt":15,"className":819,"src":466},[185,186],[26,821,469,822,473,824,476],{},[127,823,472],{},[154,825,459],{},[52,827,480],{"id":479},[26,829,483],{},[26,831,486],{},[488,833,490],{},[492,835],{"tags":494,"lang":495,"section":496},{"title":15,"searchDepth":409,"depth":415,"links":837},[838,839,848],{"id":500,"depth":383,"text":501},{"id":503,"depth":383,"text":504,"children":840},[841,842,843,844,845,846,847],{"id":507,"depth":400,"text":508},{"id":510,"depth":400,"text":511},{"id":513,"depth":400,"text":514},{"id":516,"depth":400,"text":517},{"id":519,"depth":400,"text":520},{"id":522,"depth":400,"text":523},{"id":525,"depth":400,"text":526},{"id":528,"depth":383,"text":529},{"date":532,"tags":494,"locale":495,"sidebar":533},{"title":5,"description":28},{"toc":852,"fullToc":852},[853,854,863],{"id":54,"depth":383,"text":55},{"id":100,"depth":383,"text":101,"children":855},[856,857,858,859,860,861,862],{"id":108,"depth":400,"text":109},{"id":142,"depth":400,"text":143},{"id":193,"depth":400,"text":194},{"id":230,"depth":400,"text":231},{"id":297,"depth":400,"text":298},{"id":310,"depth":400,"text":311},{"id":328,"depth":400,"text":329},{"id":479,"depth":383,"text":480},1795064852892]