0

I'm trying to use the Web Risk API to submit phishing sites for inclusion in the Google Safebrowsing lists.

Last week, and earlier today, I was able to successfully submit sites using the REST API with curl, and received back the project and operations IDs that I was able to use to check the status of the submissions.

This is the command I have been using:

curl -X POST \
    -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
    -H "Content-Type: application/json; charset=utf-8" \
    -d @request.json \
    "https://webrisk.googleapis.com/v1/projects/{project-id}/uris:submit"

Contents of request.json:

{
  "submission": {
    "uri": "https://url.to.phishing.site/"
  }
}

The error I started receiving:

{
  "error": {
    "code": 404,
    "message": "Method not found.",
    "status": "NOT_FOUND"
  }
}

I checked the GCP status page and the Web Risk API looks good there. I also checked to ensure that I have the Web Risk API enabled, and have the service account active with viewer permissions for the project. I've also copied and pasted the project ID to ensure that's correct. I tested everything by using the Web Risk API to lookup URLs (rather than submit them) and it worked as expected.

Appreciate any advice or insights on resolving this.

nopori
  • 76
  • 5

1 Answers1

0

After communicating with Google regarding this, the Web Risk Submission API requires customers to be allowlisted in order to have access (relevant docs). I'm not sure why it worked for me for a couple days, but this is why I was receiving this error. To get allowlisted, reach out to Google Cloud Sales or your Cloud Engineer.

Sergei Kozelko
  • 691
  • 4
  • 17
nopori
  • 76
  • 5