jongfeelkim-VIRNECT / STT-Hololens

Unity translation app using Google Cloud Speech-to-Text on Hololens
MIT License
3 stars 0 forks source link

Enable OAuth2.0 for Google Cloud API #15

Closed jongfeelkim-VIRNECT closed 4 years ago

jongfeelkim-VIRNECT commented 4 years ago

For google cloud translate text v3, required OAuth2.0

Finally, I want use translate v3 API https://cloud.google.com/translate/docs/reference/rest/v3/projects/translateText

jongfeelkim-VIRNECT commented 4 years ago

Install Google Cloud Platform SDK

https://cloud.google.com/sdk/docs/

Create OAuth2.0 Client IDs and download json file

image

Set credentials

Get access token - cloud sdk

gcloud auth application-default print-access-token

https://cloud.google.com/translate/docs/simple-translate-call

Get access token - auth server

https://developers.google.com/identity/protocols/oauth2/web-server