id: api-abstract-website-screenshot

info:
  name: Abstract Api Website Screenshot Test
  author: daffainfo
  severity: info
  description: Transform any URL into an image with Abstract's Website Screenshot API
  reference:
    - https://www.abstractapi.com/api/website-screenshot-api
    - https://github.com/daffainfo/all-about-apikey/tree/main/abstract-website-screenshot
  metadata:
    max-request: 1
  tags: token-spray,abstractapi

self-contained: true

http:
  - method: GET
    path:
      - "https://screenshot.abstractapi.com/v1/?api_key={{token}}&url=https://test.test"

    matchers:
      - type: word
        part: body
        words:
          - '"code":"validation_error"'
          - 'Reached error page'
        condition: and
# digest: 4a0a0047304502206901cc592b90ef07030d4562fde625678a9c5e28ddf884710bed1474bace7a29022100d33690a8ba6736728b34ad98ecb9e7a71628dc61bd526b6630a522b5983b2b9d:922c64590222798bb761d5b6d8e72950