Corpora deletion not working?

I’m getting a “403 Forbidden” response whenever I try to delete a corpus. I have no issue creating them, but it doesn’t allow me to delete them. I can’t seem to figure out why.

I’m on Unity 6, using UnityWebRequest.Delete to send the request to https://generativelanguage.googleapis.com/v1beta/corpora/test-corpus. test-corpus is completely empty. I believe the link is correct, and I’ve also tried it with the force query param set to true. I set the OAuth token with the header “Authorization: Bearer {token}” the same way I do for the creation request.

The code for the request is mainly in these two files:
GeminiManager.cs
GeminiCorporaDeleteRequest.cs

I also tried it in curl:

CURL -X "DELETE" -H "Authorization: Bearer {token}" "https://generativelanguage.googleapis.com/v1beta/corpora/test-corpus"

I’m still getting the same “403 Forbidden” error.

1 Like