URl Redirect to mediaspace category for end user

Hey Guys,
I was hoping to get some help with a part in kaltura.
i.e. Regarding CategoryUser redirect.
The thing i am trying to achieve is get back to the specific channel that an end user is added to after authenticated to our media space.
i.e say if i signup to Kaltura category User list then after registering i need to go to the specific category page rather then the media space base URL.
i.e.
[mediaspace].mediaspace.kaltura.com/category/[category_name]/[category_id]

I am hot sure how to achieve this here.
We are using external configuration to authorize the user into the media space.
i.e. [mediaspace_base_url]/user/authorize/ks/{user_ks_after_login}

Thankyou in Adv

Hello @samyam ,

I already answered this over email but for the benefit of future searchers hitting this post:
All you have to do is set the ref param. For example:

https://$BASE_URL/user/login?ref=https://$BASE_URL/category/$CAT_NAME/$CAT_ID will redirect to https://$BASE_URL/category/$CAT_NAME/$CAT_ID after a successful authentication.