You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/avatars.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,3 +128,39 @@ GET https://cloud.appwrite.io/v1/avatars/qr
128
128
| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 |
129
129
| download | boolean | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. ||
130
130
131
+
132
+
```http request
133
+
GET https://cloud.appwrite.io/v1/avatars/screenshots
134
+
```
135
+
136
+
** Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.
137
+
138
+
You can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.
139
+
140
+
When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px. **
141
+
142
+
### Parameters
143
+
144
+
| Field Name | Type | Description | Default |
145
+
| --- | --- | --- | --- |
146
+
| url | string |**Required** Website URL which you want to capture. ||
147
+
| headers | object | HTTP headers to send with the browser request. Defaults to empty. | {} |
148
+
| viewportWidth | integer | Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280. | 1280 |
149
+
| viewportHeight | integer | Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720. | 720 |
150
+
| scale | number | Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1. | 1 |
151
+
| theme | string | Browser theme. Pass "light" or "dark". Defaults to "light". | light |
152
+
| userAgent | string | Custom user agent string. Defaults to browser default. ||
153
+
| fullpage | boolean | Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0. ||
| latitude | number | Geolocation latitude. Pass a number between -90 to 90. Defaults to 0. | 0 |
157
+
| longitude | number | Geolocation longitude. Pass a number between -180 to 180. Defaults to 0. | 0 |
158
+
| accuracy | number | Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0. | 0 |
159
+
| touch | boolean | Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0. ||
160
+
| permissions | array | Browser permissions to grant. Pass an array of permission names like ["geolocation", "camera", "microphone"]. Defaults to empty. |[]|
161
+
| sleep | integer | Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0. | 0 |
162
+
| width | integer | Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width). | 0 |
163
+
| height | integer | Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height). | 0 |
164
+
| quality | integer | Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. | -1 |
165
+
| output | string | Output format type (jpeg, jpg, png, gif and webp). ||
0 commit comments