RedishMoto
投稿
コメント
Hey, Thanks for reply. I followed this document and I am not able to find how I can so chat box in website. My website is developed in Laravel and Vue Js and want to show chat box, so users can receive the Bot messages. How can I show chat box in website? Thanks
Bot 2022.03.25
Hey, Thanks for sharing the reply. Yes I followed this document and developed my functionality but not getting second bot message. I wrote below code in php $userData = [ 'accountId' => 'bai@redish-0', 'content' => [ 'type' => 'carousel', 'columns' => [[ 'thumbnailImageUrl'=>'https://~~~', 'title'=>'Works Mobile', 'text'=>'Press the button to visit', 'actions'=>[[ 'type'=>'uri', 'label'=>'Visit', 'uri'=>'https://www.naver.com' ]] ], [ 'thumbnailImageUrl'=>'https://~~~', 'title'=>'Daily Report', 'text'=>'Daily Report Test', 'actions'=>[[ 'displayText'=>'Daily Repor', 'type'=>'postback', 'data'=>'https://cpdrdev-api.motocle8.com/list-template', 'label'=>'View more', 'postback'=>'ListTempalte_ViewMore' ]] ], ] ] ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://apis.worksmobile.com/r/jp1zyBAVrZYcB/message/v1/bot/3436106/message/push"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json; charset=UTF-8","Authorization: Bearer AAABC2bxGd4xRPD7lYSe3bgiRsfn+LFdljghR4X/2QHoMvhhB6w/+1HGHylIazTO2RT8YeHp8/ZcrD78dg+I1Lm94RoUVbSOS8KVNaojdqscZk1gh4PJErUw4lvNz3+FdbeCz4ztDDpkG6XPHhPSks9Pqe4pZ2EAmP7qFE2VOoq6m7FG6FdPuxs/WNd2iwVdgYlgtnqzr+sNBEoejElHjwK5WY3CfpqJafYHToUYGkd+Uj4XzySGKSwTTPSeXJdbiGp3PI7m+IULIBZZm27gLEebec/z6IvCJu2WW0ycaaba5sE18mG7TMLhnNS6oDEQzUChtMGMUrtQ0otgbSVaowUQFfbQZ/Ew+3y9vjme4mysdbML","consumerKey: nAGnSQnpTVcGOu79C9w5")); $result = curl_exec($ch); print($result."-".$host);die; In this code, I want to call other bot message by call other API https://cpdrdev-api.motocle8.com/list-template will call List Template so when user will click on "View More" link of "Daily Report" section (Please check this screenshot https://prnt.sc/QPOveagqs4p5 ), List Template will open. Currently I am able to open list template by manually run this link https://cpdrdev-api.motocle8.com/list-template on browser. Please chek this screenshot https://prnt.sc/edsgHgB8Nq1P . So what I want when user will click on "View More" link from carousel bot message, second bot message list template will send to user automatically
Hey, I am facing same issue and getting "error":"unsupported_grant_type". I used grant_type String Y authorization_code (fixed) as per document but still getting "error":"unsupported_grant_type" How I can solve this error. Thanks
API 全般 2022.03.17