curlでログインAPIにPOSTする
$ curl -c cookie.txt -d "user=yuu3@example.net" -d "password=password123" "http://api.example.net/console/api/v2/login"
$ view cookie.txt # Netscape HTTP Cookie File # https://curl.haxx.se/docs/http-cookies.html # This file was generated by libcurl! Edit at your own risk. #HttpOnly_api.example.net FALSE / FALSE 1604647204 XSRF-TOKEN eyeeeeeeeeeeeeec1In0%3D #HttpOnly_api.example.net FALSE / FALSE 1604647204 laravel_session eyxxxxxxxxxxxYTAzIn0%3D
laravel_session項目の 「eyxxxxxxxxxxxYTAzIn0%3D」がLaravelのセッションID