Description
I am creating a WebHooks-type app that uses server-to-server Oauth authentication.
I am following the Server-to-server Oauth guidelines (here), but when I attempt to open the websocket, I always get this response:
{"module":"build_connection","success":false,"content":"token is empty","header":{}}
I am seeing token is empty
even though I am setting the Request Header Authorization with a valid bearer token.
Process
I make an initial call to https://zoom.us/oauth/token?grant_type=account_credentials&account_id={accountId}
as per the instructions here. This is successful and I am able to retrieve a valid token; example follows:
{"access_token":[REDACTED]",
"token_type":"bearer",
"expires_in":3599,
"scope":"phone:read:admin phone_e911:read:admin user:read:admin user:write:admin"}
I then create the websocket endpoint, using the URL specified in the App Feature
section of the app definition:
I can see the Authorization header in the socket definition.
map[Authorization:[Bearer [REDACTED]] Token:[REDACTED]]
… but the websocket connect attempt always returns:
{"module":"build_connection","success":false,"content":"token is empty","header":{}}
… and then disconnects.
Error
The websocket connection attempt always returns:
{"module":"build_connection","success":false,"content":"token is empty","header":{}}
… and then disconnects.
API Endpoint/s?
wss://ws.zoom.us/ws?subscriptionId=XXXXXXXXXX
https://zoom.us/oauth/token?grant_type=account_credentials&account_id=XXXXXXXXXX
How To Reproduce
As per the Process section above.
Additional context
Server is coded in Go, using the github.com/sacOO7/gowebsocket
package, which itself relies on github.com/gorilla/websocket