H-T-H / Gemini-Telegram-Bot

用Gemini API实现的Telegram机器人 A Telegram Bot using Gemini API
https://railway.app/template/HIsbMv?referralCode=4LyW6R
Apache License 2.0
139 stars 59 forks source link

User location is not supported for the API use #1

Closed honeyshine75 closed 10 months ago

honeyshine75 commented 10 months ago

I find the error. debug_error_string = "UNKNOWN:Error received from peer ipv4:172.217.161.74:443 {created_time:"2023-12-16T04:31:03.432606862+00:00", grpc_status:9, grpc_message:"User location is not supported for the API use."}" and i find the answer https://stackoverflow.com/questions/77659552/google-generative-ai-api-error-user-location-is-not-supported-for-the-api-use

will you fix it?

honeyshine75 commented 10 months ago

i deploy the docker in japan host

H-T-H commented 10 months ago

It's possible that the IPv4 address of your Japan host has been blocked by Gemini's detection system. I'd suggest deploying the service with a different, unblemished IPv4 address.

My Telegram bot is also running on a Japanese host, and I haven't encountered this situation so far.