generative-ai-js icon indicating copy to clipboard operation
generative-ai-js copied to clipboard

support specifying the application and signature.

Open 0wwafa opened this issue 1 year ago • 1 comments

Description of the feature request:

allow to specify appid and signature.

What problem are you trying to solve with this feature?

I setup an api key restricted to an application. if I use generative-ai-js , I get:

{
  status: 403,
  statusText: 'Forbidden',
  errorDetails: [
    {
      '@type': 'type.googleapis.com/google.rpc.ErrorInfo',
      reason: 'API_KEY_ANDROID_APP_BLOCKED',
      domain: 'googleapis.com',
      metadata: {
        consumer: 'projects/xxxxxxxxx',
        service: 'generativelanguage.googleapis.com'
      }
    }
  ]
}

How do I specify the app id and signature?

Any other information you'd like to share?

No response

0wwafa avatar Jun 01 '24 13:06 0wwafa

This would be controlled by the backend service and not the SDK. I'd suggest posting in the discussion forum to try to reach some of the folks who are able to make changes to the service: https://discuss.ai.google.dev/

hsubox76 avatar Jun 17 '24 17:06 hsubox76

Closing due to staleness.

IvanLH avatar Feb 25 '25 19:02 IvanLH