This repository contains a set of PowerShell scripts designed to interact with the Hyperbeam API. These scripts automate various tasks like initiating sessions, terminating them, and opening embedded URLs.
- powerbeam_start.ps1: Sends a POST request to the Hyperbeam API to start a session. The response, including the session ID and embed URL, is saved to a
response.json
file and opening the session on the standard browser. - powerbeam_disable.ps1: Reads the session ID from the saved
response.json
file and sends a DELETE request to terminate the session.
- PowerShell
HYPERBEAM_API_KEY
set as an environment variable. This is your API key for the Hyperbeam service.
For a temporary setup (current session only):
$env:HYPERBEAM_API_KEY = "YOUR_API_KEY_HERE"
For a permanent setup, refer to the system's environment variable settings.
-
Clone the repository:
git clone https://github.com/YOUR_GITHUB_USERNAME/PowerBeam.git
-
Navigate to the project directory:
cd PowerBeam
-
Run the desired script:
.\powerbeam_start.ps1
Please bear in mind that production sessions using Hyperbeam have a limit of 10000 minutes per month, so it is crucial to disable the session when you are done using the hyperbeam browser.
In order to terminate the session, simply run:
.\powerbeam_disable.ps1
Confirm that the session was terminated by reading the response message on the screen
Please ensure your API key remains confidential. Do not hard-code it in scripts or expose it in public repositories. Always store it securely, preferably using environment variables or secret management tools.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.