Hi, could anybody give a sample usage about the snapshot API (https://developers.cloudflare.com/api

Hi, could anybody give a sample usage about the snapshot API (https://developers.cloudflare.com/api/python/resources/browser_rendering/subresources/snapshot/methods/create/) ?
I wanna add the "full_page" and "type" to request, but I always get a error:

I have tried these 2 request body ,but not work either:
{
    "url": "https://www.bbc.com/",
    "screenshot_options":  {"full_page" : true , "type":"webp" }
  }


{
    "url": "https://www.bbc.com/",
    "full_page" : true , 
    "type":"webp" }
  }


I got this error:
{
    "errors": [
        {
            "code": "unrecognized_keys",
            "keys": [
                "screenshot_options"
            ],
            "path": [
                "body"
            ],
            "message": "Unrecognized key(s) in object: 'screenshot_options'"
        }
    ],
    "success": false,
    "result": {}
}


How should I fix it ? Thanks
Interact with Cloudflare's products and services via the Cloudflare API
Was this page helpful?