Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
816 views
in Technique[技术] by (71.8m points)

google api - R- Following Error: API returned: Request had insufficient authentication scopes

I've verified my API in RStudio after hours of trying and now I've reached another error while trying to translate a sentence. Would be grateful for any help!

I'm just trying to translate "hello" to french using googleLanguageR package -

> gl_translate("Hello", "fr")

The result I get is this -

2021-01-21 17:15:36 -- Translating text: 5 characters - 
i 2021-01-21 17:15:36 > Request Status Code:  403
Error: API returned: Request had insufficient authentication scopes.

I'm a literal beginner in the field of computing and do not understand what scopes mean here.

Thanks for the help!

question from:https://stackoverflow.com/questions/65836704/r-following-error-api-returned-request-had-insufficient-authentication-scopes

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Scopes are permissions that you give to apps you use to access an API. For example, one App might have permission to read the private messages of a users, whereas another doesn't. It's similar to when an app on your phone asks for permission to use the camera, or access your contacts.

Your app is trying to do something that it doesn't have permission to do. You'll need to add the relevant scopes in whatever setting that it is where you're generating keys etc. Presumably Google Data Studio?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...