JavaScript
const options = {method: 'GET', headers: {'X-Browser-Use-API-Key': '<api-key>'}}; fetch('https://api.browser-use.com/api/v3/sessions/{session_id}/messages', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "messages": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "role": "<string>", "data": "<string>", "hidden": true, "createdAt": "2023-11-07T05:31:56Z" } ], "hasMore": true }
Return messages for a session with cursor-based pagination (chronological order).
Cursor: return messages after this message ID
Cursor: return messages before this message ID
1 <= x <= 100
Successful Response
Show child attributes