id: api-cloudflare

info:
  name: Cloudflare API Test
  author: ffffffff0x
  severity: info
  reference:
    - https://dash.cloudflare.com/profile/api-tokens
  metadata:
    max-request: 1
  tags: token-spray,cloudflare

self-contained: true

http:
  - raw:
      - |
        GET https://api.cloudflare.com/client/v4/user/tokens/verify HTTP/1.1
        Host: api.cloudflare.com
        Authorization: Bearer {{token}}
        Content-Type:application/json

    matchers:
      - type: word
        part: body
        words:
          - 'This API Token is valid and active'
# digest: 490a0046304402206170a1cda09b74217dc98d6459256913cb043d8dbe7d40173348b6b7f95f5d5d0220502ef68a11a0e6f3f350a10fd43fec54d76162de3dc7015d85fb2fcc079b63dc:922c64590222798bb761d5b6d8e72950