To add to Nico's answer, you can directly fetch the token by using 
https://github.com/google/oauth2l for a specific scope you are interested 
in, like this for the cloud platform (which the Speech API is part of 
<https://developers.google.com/identity/protocols/googlescopes>):

$ ~/.local/bin/oauth2l fetch -f bare cloud-platform

Hope it helps,
`p


On Wednesday, August 24, 2016 at 10:09:54 PM UTC-4, Nicolas Noble wrote:
>
> It depends on your platform. But basically, you need to use and 
> authenticate with the gcloud command line tool, which will create the token 
> for you that will be read by grpc automatically. 
>
> See https://cloud.google.com/sdk/gcloud/reference/auth/login about how to 
> do that. 
>
> On Wed, Aug 24, 2016, 18:43 Manh Tran <[email protected] <javascript:>> 
> wrote:
>
>> Hi,
>>
>> I'm writing a gRPC client connect to google cloud speech. I think it 
>> needs an access token to connect to google cloud. Please tell me how to get 
>> an access token OAuth2 on gRPC C++.
>>
>> Thanks.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "grpc.io" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/grpc-io/25d7e7d5-8d67-4f0c-96bd-775a9397e4d4%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/grpc-io/25d7e7d5-8d67-4f0c-96bd-775a9397e4d4%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/61a55240-4953-444a-84a1-734354bca60a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to