Hi, developers.
I am trying to dev GPTs with Action. As the first one, I have prepared GPT connecting with NewsAPI.
However, the GPT keep encountering error 400 which says “userAgentMissing”.
I have no idea how to be managed userAget set and there is no option to configure it in GPT builder.
I have tried including custom userAgent setting into schema, however GPT builder did not accept that showing the following error message.
"In path /everything, method get, operationId searchNews, parameter User-Agent has location header; ignoring"
Here is debugging log on GPT builder test API connection.
[debug] Calling HTTP endpoint
{
"domain": "newsapi.org",
"method": "get",
"path": "/everything",
"operation": "searchNews",
"operation_hash": "4cafe943da6cdd2fca228f75fe166bb9bdbaef2f",
"is_consequential": false,
"params": {
"q": "world news",
"searchIn": "title",
"sources": ""
}
}
[debug] Response received
{
"function_name": "searchNews",
"domain": "newsapi.org",
"message": "The requested action requires approval",
"action_id": "g-a57515882bb6f6dfafccf7ebc38ea8e5c620b3e3"
}
[debug] Calling HTTP endpoint
{
"domain": "newsapi.org",
"method": "get",
"path": "/everything",
"operation": "searchNews",
"operation_hash": "4cafe943da6cdd2fca228f75fe166bb9bdbaef2f",
"is_consequential": false,
"params": {
"q": "world news",
"searchIn": "title",
"sources": ""
}
}
[debug] Response received
{
"response_data": {
"status": "error",
"code": "userAgentMissing",
"message": "Please set your User-Agent header to identify your application. Anonymous requests are not allowed."
},
"status_code": 400,
"action_id": "g-a57515882bb6f6dfafccf7ebc38ea8e5c620b3e3"
}
Any advice from you, I appreciate thanks in advance.