I’ve use the “app extension ai” feature to create an extension that will create a new youtube comment on my youtube videos.
Once i’ve connected my account etc… and then test I get this error:
{
"request": {
"method": "POST",
"url": "https://www.googleapis.com/youtube/v3/comments",
"querystring": {
"part": "snippet"
},
"headers": {
"content-type": "application/json"
},
"body": "{\"snippet\": {\"videoId\": \"iHUMAN FILTERED]\", \"parentId\": \"\", \"textOriginal\": \"hello\"}}",
"data": {
"snippet": {
"videoId": ""HUMAN FILTERED]",
"parentId": "",
"textOriginal": "hello"
}
}
},
"response": {
"status": 403,
"headers": {
"www-authenticate": ":censored:130:ceec02dff5:",
"vary": "Origin, X-Origin, Referer",
"content-type": "application/json; charset=UTF-8",
"content-encoding": "gzip",
"date": "Mon, 27 Nov 2023 12:35:26 GMT",
"server": "scaffolding on HTTPServer2",
"cache-control": "private",
"x-xss-protection": "0",
"x-frame-options": "SAMEORIGIN",
"x-content-type-options": "nosniff",
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"transfer-encoding": "chunked"
},
"body": "{\n \"error\": {\n \"code\": 403, \n \"message\": \"Request had insufficient authentication scopes.\", \n \"errors\": \\n {\n \"message\": \"Insufficient Permission\", \n \"domain\": \"global\", \n \"reason\": \"insufficientPermissions\"\n }\n ], \n \"status\": \"PERMISSION_DENIED\", \n \"details\": "\n {\n \"@type\": \"type.googleapis.com/google.rpc.ErrorInfo\", \n \"reason\": \"ACCESS_TOKEN_SCOPE_INSUFFICIENT\", \n \"domain\": \"googleapis.com\", \n \"metadata\": {\n \"service\": \"youtube.googleapis.com\", \n \"method\": \"youtube.api.v3.V3DataCommentService.Insert\"\n }\n }\n ]\n }\n}",
"data": {
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"errors":
{
"message": "Insufficient Permission",
"domain": "global",
"reason": "insufficientPermissions"
}
],
"status": "PERMISSION_DENIED",
"details":
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
"domain": "googleapis.com",
"metadata": {
"service": "youtube.googleapis.com",
"method": "youtube.api.v3.V3DataCommentService.Insert"
}
}
]
}
}
}
}
The issue seems to be “Request had insufficient authentication scopes” so I added “https://www.googleapis.com/auth/youtube.force-ssl” to the scope section and still getting the same issue.