Quantcast
Channel: Kaltura - Latest posts
Viewing all articles
Browse latest Browse all 7410

App token session request flow: SERVICE_FORBIDDEN

$
0
0

Hello, I’m unable to get the app token request flow described on https://developer.kaltura.com/api-docs/VPaaS-API-Getting-Started/Authorizing-With-Application-Token.html to work.

According to the documentation, it appears that I should be requesting an app token session based on a widget session, but I’m getting a “KalturaException: The access to service [appToken->startSession] is forbidden (SERVICE_FORBIDDEN)”. I’m not sure if that’s because of the widgetSession itself, the particular hash I’ve built, the roles associated with the user/app token, or what exactly. Any help would be appreciated, even simply examples of how to get this to work in other languages.

Python code:

kaltura_session = client.session.startWidgetSession(widget_id)
token_session_hash = hashlib.sha1(kaltura_session.ks + app_token.token).hexdigest()
priveleged_kaltura_session = client.appToken.startSession(app_token.id, token_session_hash)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../lib/python2.7/site-packages/KalturaClient/Plugins/Core.py", line 57471, in startSession
    resultNode = self.client.doQueue()
  File ".../lib/python2.7/site-packages/KalturaClient/Client.py", line 357, in doQueue
    resultNode = self.parsePostResult(postResult)
  File ".../lib/python2.7/site-packages/KalturaClient/Client.py", line 317, in parsePostResult
    self.throwExceptionIfError(resultNode)
  File ".../lib/python2.7/site-packages/KalturaClient/Client.py", line 385, in throwExceptionIfError
    raise exceptionObj
KalturaException: The access to service [appToken->startSession] is forbidden (SERVICE_FORBIDDEN)
The access to service [appToken->startSession] is forbidden (SERVICE_FORBIDDEN)

Viewing all articles
Browse latest Browse all 7410

Trending Articles