TwilioDevEd / video-access-token-server-php

Twilio Video server-side web app in PHP
MIT License
26 stars 26 forks source link

Return token as JSON, remove Room from grant #22

Open jandusek opened 6 years ago

jandusek commented 6 years ago

In order for the Video Quickstart JS to be able to process the token, it needs to be returned as a JSON.

ceaglest commented 6 years ago

As far as I know all of the token servers return the same format - a raw text body. Please don't merge a change unless its coordinated with the other dependencies of this project:

https://github.com/twilio/video-quickstart-swift https://github.com/twilio/video-quickstart-objc https://github.com/twilio/video-quickstart-android

As well as all of the other example servers.

jandusek commented 6 years ago

The Node.js quickstart's /token returns JSON: https://github.com/twilio/video-quickstart-js/blob/master/server/index.js#L73-L76

And the JS client expects JSON: https://github.com/twilio/video-quickstart-js/blob/master/quickstart/src/index.js#L43

Good point about the other dependencies, I'm not sure what format those need.

But this should probably be unified one way or the other.