jefflinwood / twilio_client_phonegap

Phonegap plugins for the Twilio Client iOS and Android SDKs
MIT License
59 stars 53 forks source link

Token Type #77

Closed jonathanhollander closed 6 years ago

jonathanhollander commented 6 years ago

Hello I'm trying to setup this plugin with twilio and am a bit confused about 1 part.

In the example you have: tokenRequest.open('GET', 'http://yourserver.example.com/twilio-token.php');

which shows the example of reaching out to the server to get the twilio token, but what type of token should it return?

A Client Token? or an AccessToken with a VoiceGrant? Sorry I'm new to Twilio. It would be great if you could show an example php file.

jefflinwood commented 6 years ago

Hi,

This would be a Twilio iOS or Android Client Capability Token - here is a good guide on how to create those from PHP or another language:

https://www.twilio.com/docs/guides/client/capability-tokens

You'll need to switch the language over to PHP when you go to that page.

Thanks for trying the plugin!