Documentation

API V6 Documentation

A comprehensive documentation of the Browser.lol V6 API for creating and managing workspaces

Avatar
Author
BROWSER.LOL
Published at May 22, 2024
5 min read

To be able to use the API, you need an API key. Contact us to discuss the available options.

The API makes it possible to start a session with certain parameters directly without the user having to start it manually. The required end points and their parameters are listed below. The API is designed to be as simple as possible and can be used by any programming language.

GET/api/v6/getKey

Response Body on Success:

{"success":true,"token":"SAMPLECODE","quota":100,"count":100,"remaining":0}

Important: The request must always be made on the server side and the API key must be kept secret.

This endpoint can be used to retrieve a session key which can then be used to start a session on the client. The number of requests to this endpoint is unlimited. Once a key has been created, it is valid for 2 hours. A session is only added to the quota when it is started in the next step.

Request Parameters:

key: The API key assigned to your organization.

Possible Errors/api/v6/*

All errors that could occur are listed below.

Wrong Credentials:

{"success":false,"message":"auth-failed"}

Quota Exceeded:

{"success":false,"message":"quota-exceeded","quota":100,"count":100,"remaining":100}

Serverside Error:

{"success":false,"message":"srv-error"}
GET/b

Called directly from the client browser.

This endpoint can be started directly on the client with all the necessary parameters. After calling the URL in the client's browser, the process of creating the browser is displayed. As soon as this has been created, the session is automatically redirected.

Attention: If this URL is called and an old session is still active on the client, it is deleted and a new one is automatically started.

Request Parameters:

key: The key that was generated with the /getKey endpoint.

browser: A browser in which the session is subsequently opened. The following browsers are currently available: Chrome, Edge, Firefox, Tor, Brave, Opera. If this parameter is not specified, Chrome is used by default.

url: The url to be opened in the virtual browser. For long URLs exceeding the URL length limit, use a short URL ID (format: url_XXXXXXXXXX) generated via the /shortUrl endpoint.

callbackUrl: If a URL is specified, the user is redirected to it after the session has been ended manually. If none is specified, the application itself is referred to by default.

POST/api/v6/shortUrl

Response Body on Success:

{"success":true,"id":"url_1234567890"}

No authentication required: This endpoint can be called from client-side or server-side without an API key.

Important: Short URLs expire after 1 hour. Create the short URL shortly before starting the session.

This endpoint allows you to create a shortened URL reference to bypass URL length limits. The returned short URL ID can be used in place of a long URL when creating workspaces via the /b endpoint. This is useful when the target URL exceeds the maximum allowed URL length.

Request Body:

url: The full URL to shorten (JSON body: {"url": "https://..."}).