0
votes

Getting an issue when trying to call opentok/session/create api. When calling the api through code i keep getting an error saying the connection has been closed. So I decided to try through postman and the error i'm getting back is a 500 internal server error and a message

{
    "message": "Internal server error, working hard to fix it, sorry",
    "code": -1
}

As far as I can see I have everything set correctly. Headers, Body ]

I don't think this is a JWT issue as according to the documentation that would be a 403. https://tokbox.com/developer/rest/#session_id_production

Anyone experienced this or a similar issue before

1
Try removing the Content-Type header from the request. I've seen this cause issues with requests to OpenTok v1 API endpoints.adrice727
@adrice727 This wasn't the exact answer but it set me on the right track. I had to specifically set the Content-Type to application/x-www-form-urlencoded. Thanks for the help.DavidMcEvilly

1 Answers

2
votes

The issue ended up being the content Content-Type header I had to set

Content-Type: application/x-www-form-urlencoded

Credit to @adrice727's comment for suggesting there might be an issue with the Content-Type header.