It seem only read access_token from OAuth2Credential* credential. 
Currently, I've credentials-key.json. Are there any way using 
this credentials-key.json file to get access token from google's server.

Thanks.

On Friday, August 26, 2016 at 4:10:02 AM UTC+7, Paul Grosu wrote:
>
> Gladly :)  Check out webflow_sample_main.cc example 
> <https://github.com/google/google-api-cpp-client/blob/master/src/samples/webflow_sample_main.cc>
>  
> on line 386 
> <https://github.com/google/google-api-cpp-client/blob/master/src/samples/webflow_sample_main.cc#L386>
> :
>
>    string new_access_token = credential->access_token().as_string();
>
> Hope it helps,
> ~p
>
>
> On Thursday, August 25, 2016 at 3:29:47 AM UTC-4, Manh Tran wrote:
>>
>> Could you show me detail using the Google APIs Client Library for C++?
>>
>> Thank you so much.
>>
>> On Thursday, August 25, 2016 at 12:16:13 PM UTC+7, Paul Grosu wrote:
>>>
>>>
>>> Of course :)  You have two options:
>>>
>>> 1) Use the Google APIs Client Library for C++:
>>>
>>>   https://google.github.io/google-api-cpp-client/latest/guide/oauth2.html 
>>> <https://google.github.io/google-api-cpp-client/latest/guide/oauth2.html>
>>>
>>> 2) Or just use execve system call to run an external program to provide 
>>> the token :)
>>>
>>> ~p
>>>
>>> On Thursday, August 25, 2016 at 1:05:08 AM UTC-4, Manh Tran wrote:
>>>>
>>>> Are there any way to get token within my C++ program?
>>>>
>>>> Thanks.
>>>> On Thursday, August 25, 2016 at 9:09:54 AM UTC+7, 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]> 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].
>>>>>> 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/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/1de7231e-809e-4ef5-8716-611ace6d21b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to