SESSION_FORBIDDEN Errors

Hi,

I am using the Kaltura Python Client Library. I’ve run the unit tests that are provided after inputting all my credentials into the configuration file, but I get 9 errors out of the 24 tests. All the exceptions are of the type SERVICE_FORBIDDEN, like this “The access to service [playlist->add] is forbidden (SERVICE_FORBIDDEN)”. I get them for playlist.add (6 times), category.add, metadataprofile.add and widget.list. I’ve also tried to run these services using the API Test Console (https://developer.kaltura.com/console/#/session.end) and it throws the exact same error.

I’m not sure why this is, as I thought I had established an Admin session. Could anybody help me with this issue?

Thank you!

Hi,

More info is needed:

  • Which server version are you working on? Also, is this Kaltura’s SaaS [www.kaltura.com] or CE/OnPrem?
  • Which version of the Python client lib are you running?
  • How did you generate a KS? If you are on CE or OnPrem, you can decode the KS you have by going to Admin Console->system helper->check the ‘KS’ radio button, and input the KS in “String to manipulate:”

The result will be something like:

Kaltura_Client_KalturaInternalTools_Type_InternalToolsSession Object
(
    [partner_id] => 102
    [valid_until] => 1465050734
    [partner_pattern] => 102
    [type] => 2
    [error] => 
    [rand] => 1464964334
    [user] => admin
    [privileges] => disableentitlement
    [relatedObjects] => 
)

KS valid until: 04/06 15:32:14
Time now: 1464964346 (03/06 15:32:26)

If you are working with Kaltura’s SaaS, you can use the Kaltura CLI client lib by downloading:
http://cdnbakmi.kaltura.com/content/clientlibs/cli_14-05-2015.tar.gz

and following instructions in the README.
You will then be able to run:

# extks YOURKS

and get something like:

partner_id
partner_pattern
valid_until 1465050899 = 2016-06-04 15:34:59 (will expire in 23 hours and 59 minutes)
type 2
rand 1464964499.4276
user admin
privileges disableentitlement
master_partner_id
additional_data

@jess, I have realised, thanks to the output you posted, that I had been using the incorrect user ID. I have changed it to “admin” and all the tests pass now. Thank you very much for your help, I’m not sure I would have noticed such a silly mistake otherwise. :slight_smile: