GoogleCloudPlatform / genai-for-marketing

Showcasing Google Cloud's generative AI for marketing scenarios via application frontend, backend, and detailed, step-by-step guidance for setting up and utilizing generative AI tools, including examples of their use in crafting marketing materials like blog posts and social media content, nl2sql analysis, and campaign personalization.
https://cloud.google.com/vertex-ai/
Apache License 2.0
309 stars 113 forks source link

Encounter "The request is missing a valid API key" when trying to set up Google Drive #135

Open superanalytic opened 1 month ago

superanalytic commented 1 month ago

I am a customer engineer(CE) at Google and I have Google Workspace license assigned to my CE Argolis admin account. I was able to complete Step 1 the Terraform Deployment. But I kept getting the "The request is missing a valid API key" error when I ran

echo "{}" >> gdrive_folder_results.json python scripts/create_gdrive_folder.py --folder-name="genai-marketing-assets" --service-account-email=

from Step 3 - Set up Google Drive.

Here is the error reported: { "error": { "code": 403, "message": "The request is missing a valid API key.", "errors": [ { "message": "The request is missing a valid API key.", "domain": "global", "reason": "forbidden" } ], "status": "PERMISSION_DENIED" }

thekoma commented 1 month ago

Hi! I'm thekoma@ (same role ping me if you want)

Have you set up the default application login?

gcloud auth application-default login \
--scopes='https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/drive'
superanalytic commented 1 month ago

Hi Andrea,

Thank you for this check. I did run this step and here is the screenshot I got

[image: Screenshot 2024-10-17 at 12.38.57 PM.png]

Connie Outwater

Customer Engineer, Data Analytics

949-529-2556 <(949)%20529-2556> (work)

@.***

On Thu, Oct 17, 2024 at 12:26 PM Andrea Cervesato @.***> wrote:

Hi! I'm thekoma@ (same role ping me if you want)

Have you set up the default application login?

gcloud auth application-default login \ --scopes='https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/drive'

— Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/genai-for-marketing/issues/135#issuecomment-2420360087, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKJDJ5N6DDW6QSVACQZFBV3Z4AFO7AVCNFSM6AAAAABQEFILI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRQGM3DAMBYG4 . You are receiving this because you authored the thread.Message ID: @.***>

chmstimoteo commented 2 weeks ago

@superanalytic any news on this issue?

superanalytic commented 2 weeks ago

I tried suggestion. But I still ran into the same issue.

michaelwsherman commented 2 weeks ago

Were there any errors during the terraform apply step?

michaelwsherman commented 2 weeks ago

And can you confirm you're doing this all via Cloud Shell and that you did terraform via Cloud shell?

superanalytic commented 2 weeks ago

I did my comment via Cloud Shell.

chmstimoteo commented 2 weeks ago

@thekoma is gently offering an extra pair of eyes to troubleshoot.

Thanks @thekoma !!