---
title: "Storage Integration | ScreenshotAPI Docs"
slug: "/docs/storageIntegration"
description: "Learn how to integrate external storage services with ScreenshotAPI. This guide covers the steps to configure storage options for automated screenshot delivery."
---

# Storage Integration

ScreenshotAPI gives you the ability to integrate third-party storage services such as `Wasabi`,`Amazon S3`, and`Google Cloud Storage` for storing your captured screenshots, PDFs, or videos. This integration allows you to automatically route your capture outputs directly into your own storage buckets, ensuring secure, scalable, and centralized file management.

You can configure multiple buckets per service, choose a default bucket for fallback, and dynamically select storage destinations per request. This provides full flexibility based on your project or team requirements.

To configure a storage service, go to the Storage Integration tab in your ScreenshotAPI`Dashboard`, where you can add and manage your storage credentials and buckets with ease.

![Image](https://screenshotapi.net/_next/image?url=%2Fimages%2Fdocs%2Fstorage-integration.png&w=2048&q=75)

This setup is ideal for organizations that want to maintain ownership of their data while leveraging ScreenshotAPI's automation and capture capabilities.

Each storage integration requires a few essential fields:

*   **endpointUrl:** The base URL used to interact with the storage service (e.g.,`https://s3.eu-central-2.wasabisys.com`for Wasabi).
*   **accessKey:** Your storage service’s public key used for authentication.
*   **secretKey:** The private key paired with your access key for secure API access.
*   **region:** The geographical region of your bucket (e.g., `us-east-1`).
*   **bucketName:** The name of your storage bucket where files will be uploaded.
*   **projectId:** Required only for Google Cloud Storage; it specifies the GCP project associated with the bucket.

![Image](https://screenshotapi.net/_next/image?url=%2Fimages%2Fdocs%2Fbucket-configuration-fields.png&w=2048&q=75)

Bucket Configuration Fields

After providing the required credentials for the selected storage service, the user must test the connection to the bucket to ensure that all configurations are valid and the integration is functioning correctly. This validation step helps prevent storage errors during actual screenshot operations and ensures the system has proper access to the specified bucket.

Following is the API endpoint that demonstrates how to use your configured bucket for saving screenshots:

```js

const axios = require("axios");

let config = {
	method: "get",
	maxBodyLength: Infinity,
	url: "https://shot.screenshotapi.net/v3/screenshot?token={token}&url=www.google.com&byob=true&storage_service=wasabi&bucket_name={bucket}",
	headers: { }
};

axios.request(config).then((response) => {
	console.log(JSON.stringify(response.data));
}.catch((error) => {
	console.log(error);
});
```

```php

<?php
	$client = new http.Client;
	$request = new http.Client.Request;
	$request->setRequestUrl("https://shot.screenshotapi.net/v3/screenshot?token={token}&url=www.google.com&byob=true&storage_service=wasabi&bucket_name={bucket}");
	$request->setRequestMethod("GET");
	$request->setOptions(array());

	$client->enqueue($request)->send();
	$response = $client->getResponse();
	echo $response->getBody();
?>
```

```go

package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {
	url := "https://shot.screenshotapi.net/v3/screenshot?token={token}&url=www.google.com&byob=true&storage_service=wasabi&bucket_name={bucket}"
	method := "GET"

	client := &http.Client { }
	req, err := http.NewRequest(method, url, nil)

	if err != nil {
		fmt.Println(err)
		return
	}

	res, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}

	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}
```

```java

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder().url("https://shot.screenshotapi.net/v3/screenshot?token={token}&url=www.google.com&byob=true&storage_service=wasabi&bucket_name={bucket}"
	.method("GET", body)
	.build();
Response response = client.newCall(request)
	.execute();
```

```py

import requests

url = "https://shot.screenshotapi.net/v3/screenshot?token={token}&url=www.google.com&byob=true&storage_service=wasabi&bucket_name={bucket}"
payload = {}
headers = {}

response = requests.request("GET", url, headers, data=payload)
print(response.text)
```

```ruby

require "uri"
require "net/http"

url = URI("https://shot.screenshotapi.net/v3/screenshot?token={token}&url=www.google.com&byob=true&storage_service=wasabi&bucket_name={bucket}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
```

Replace **token** with your`API TOKEN`and **bucket_name** with the name of your integrated bucket.

### Reference Links

[How do i get Amazon S3 access key?](https://support.promax.com/knowledge/amazon-s3)

[How to locate Project ID for Google Cloud?](https://support.google.com/googleapi/answer/7014113?hl=en)

[What is Request endpoint in Cloud Storage?](https://cloud.google.com/storage/docs/request-endpoints)

[How to create a new Access Key?](https://docs.wasabi.com/v1/docs/creating-a-new-access-key)

[How can I get the file "service_account.json" for Google Cloud Storage?](https://stackoverflow.com/questions/46287267/how-can-i-get-the-file-service-account-json-for-google-translate-api)

## Required Parameters

### Bring Your Own Bucket (BYOB)

**Parameter Name :** `byob`

Allows the use of a custom storage bucket that has already been configured under the [Storage Integrations](https://app.screenshotapi.net/storage-integrations) tab. This enables direct saving of screenshots to your own cloud bucket instead of the default storage.

Default value:`false`.

_`Note:` Make sure the storage integration is properly set up and tested before enabling this parameter._

## Optional Parameters

If the optional parameters are not provided while byob is enabled, ScreenshotAPI will automatically use the default configured storage service and bucket associated with your account. This ensures seamless operation without requiring these fields in every request. However, it is recommended to explicitly provide these parameters when managing multiple storage services or buckets to avoid ambiguity and ensure data is stored in the intended location.

### Storage Service

**Parameter Name :** `storage_service`

Specifies which storage service to use for saving the screenshot when`byob` is enabled and multiple services are already configured. This must match the exact name of the service listed in the [Storage Integrations](https://app.screenshotapi.net/storage-integrations) tab (e.g., aws, wasabi, google_cloud).

Supported services:

*   **Amazon S3 (aws)** — Amazon's highly scalable and reliable cloud storage service. Industry standard for object storage with global availability.
    
*   **Wasabi** — Cost-effective cloud storage compatible with S3 APIs. Offers faster upload speeds and predictable pricing without egress fees.
    
*   **Google Cloud** — Google's robust cloud storage platform with strong integration capabilities. Provides excellent performance and seamless integration with other Google services.
    

Default value:`' '`.

_`Note:` This parameter is required when byob is set to `true`. Ensure the selected service is correctly configured and tested._

### Bucket Name

**Parameter Name :** `bucket_name`

Specifies the name of the storage bucket to which the screenshot will be saved when `byob` is enabled. This must match the exact bucket name configured under the [Storage Integrations](https://app.screenshotapi.net/storage-integrations) tab. Specify this if you have multiple buckets configured under the same service.

Default value:`' '`.

_`Note:` This parameter is required when byob is set to `true`. Ensure the bucket is correctly configured and accessible._
