This example first uses Implicit Auth with scope channel:read:stream_key to get a token to use.

Get the code for this example on Github or just View the source instead

After authenticating to get a Key, it calls

Authorize