Authentication issue related to configuring Google Custom Search through a Custom GPT Action

I am trying to configure Google Custom Search through a GPT action. The custom search API has been tested successfully on Postman. However, once I configured the OpenAPI JSON schema in GPT Action, it brought me the error message:

{
“response_data”: {
“error”: {
“code”: 403,
“message”: “Method doesn’t allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.”,
“errors”: [
{
“message”: “Method doesn’t allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.”,
“domain”: “global”,
“reason”: “forbidden”
}
],
“status”: “PERMISSION_DENIED”
}
},
“status_code”: 403,
“action_id”: “g-c40ef9b810b8d02a1fa94d9301d6e93c54b15ed4”
}

What might be the reason for this?

You might want to check the authorization process for Google search and see if those data is being sent properly from your GPT. It might be possible the Postman app is sending the required auth headers in proper format while your GPT might not be doing the same.

Another option is hosting a webserver and connect it via Oauth2 to your Custom GPT and from your webserver create an endpoint which can invoke your Google api and send results back to GPT

Im facing the same issue as well. Postman executes fine. But no matter what I do, the custom GPT authentication does not work for Google API (I’m accessing youtube APIs). Did anyone find a resolution. It also seems the specification says both an API key and Oauth are required but in postman the API key works fine without oauth.

I’m facing the same issue. The function runs smoothly when I execute it locally to retrieve Google Calendar events, but I encounter difficulties when trying to run it within my web application. Has anyone discovered a solution for this problem?

{
“error”: {
“code”: 403,
“message”: “Method doesn’t allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.”,
“errors”: [
{
“message”: “Method doesn’t allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.”,
“domain”: “global”,
“reason”: “forbidden”
}
],
“status”: “PERMISSION_DENIED”
}
}

Seems it’s Google’s policy to prevent OpenAI functions. I found success in creating a web app to make calls to Google API, with non-related header info, and in turn, calling the app through OpenAI function calling.