Add user to private forum allowed list

Avatar
  • updated
  • Answered
Is there a way through the API for us to add a user to the "allowed user" list for a private forum? We want to automatically allow new beta users to get forum access.
Pinned replies
Avatar
Sergey Stukov co-founder
  • Answer
  • Answered
It's possible using Single Sign On function 

Just pass additional parameter allowed_private_forums: [forum_id],
inside SSO token.
Avatar
Richard Sloggett (Support)
  • PINNED
Quote from Sergey Stukov
Try to put forum_id in square brackets

"allowed_private_forums":[10505]

Many thanks for your help with this - up and running now. Your support is excellent. Feel free to use the VB.NET SSO_TOKEN generation code I sent - might help someone else get up and running with a VB.NET site.
Avatar
Vladimir Mullagaliyev co-founder
Quote from Ashley Lewis

What is [forum_id]? I my userecho server is returning:{ "status": "error", "message": "Forum doesn't exist" }

Replace the [forum_id] with ID of your forum. Go to your Project Settings -> Community forums and check ID for selected forum.

Avatar
Ashley Lewis

What is [forum_id]? I my userecho server is returning:{ "status": "error", "message": "Forum doesn't exist" }

Avatar
Sergey Stukov co-founder
  • Answer
  • Answered
It's possible using Single Sign On function 

Just pass additional parameter allowed_private_forums: [forum_id],
inside SSO token.
Avatar
Richard Sloggett (Support)
  • PINNED
Quote from Sergey Stukov
Try to put forum_id in square brackets

"allowed_private_forums":[10505]

Many thanks for your help with this - up and running now. Your support is excellent. Feel free to use the VB.NET SSO_TOKEN generation code I sent - might help someone else get up and running with a VB.NET site.
Avatar
Sergey Stukov co-founder
Quote from Richard Sloggett (Support)
Many thanks for this - I have added HttpUtility.UrlEncode call to make sure the SSO_TOKEN is correctly url encoded.

I'm now seeing a different problem - when I try and visit the private forum using our token url I now don't get the "private forum" message, but instead I see:

We are updating UserEcho please refresh page after few seconds

I waited a few minutes (about 30 so far) but the message doesn't change. If I log in manually from the main userecho page, I can get to the forum Ok.
Try to put forum_id in square brackets

"allowed_private_forums":[10505]

Avatar
Quote from Sergey Stukov
We checked your code and find out solution.
Just replace '+' symbol to '%2B at the final SSO_TOKEN

Something like this
.Replace("+", "%2B");
Many thanks for this - I have added HttpUtility.UrlEncode call to make sure the SSO_TOKEN is correctly url encoded.

I'm now seeing a different problem - when I try and visit the private forum using our token url I now don't get the "private forum" message, but instead I see:

We are updating UserEcho please refresh page after few seconds

I waited a few minutes (about 30 so far) but the message doesn't change. If I log in manually from the main userecho page, I can get to the forum Ok.
Avatar
Sergey Stukov co-founder
We checked your code and find out solution.
Just replace '+' symbol to '%2B at the final SSO_TOKEN

Something like this
.Replace("+", "%2B");
Avatar
Sergey Stukov co-founder
Quote from Richard Sloggett (Support)
Thanks for the follow up. I've added quotes around the parameter name (also tried around the parameter value too), like so:

{"guid":"test@test.net",

"expires_date":"2012-01-25 10:03:05",

"display_name":"Test User",

"email":"test@test.net",

"locale":"en",

"allowed_private_forums":10505}



.. but still get the same "forum is private" error. Here is my url including SSO token for my latest attempt:

http://innovasys.userecho.com?sso_token="j6lFH53WSI63+0RVrrvmLOAo5ULNrRMNgJVfgtcFVSsr/2X+Z1dYSpCOXRQELbeMoonfOHTa8LhcP8Yj+6rttqzqJ3QGMlIz5o80EGGW3ucTlX1+sHEiss0p0FqnbEbHSyTzs28aq2tXmudkcLmxfc8nnsth1LD+kjVCKL9y7R/Yq2kjj72Cijld7CNy9IBqwAdg4Uehy0ZxQ58JeNRN/KA4wF2q3h0KT6hiPfNvIEi6c76CZlwXYTkHvy9lFI2/"
We checked your token decoder fails when trying base64 decode.
Can you send your function that generates SSO_TOKEN to info@userecho.com
It's will be fastest way to localize and fix issue.
Avatar
Quote from Sergey Stukov
Your Private forum Liminitix has id 10505
Also put allowed_private option in double quotes like other parameters
Thanks for the follow up. I've added quotes around the parameter name (also tried around the parameter value too), like so:

{"guid":"test@test.net",

"expires_date":"2012-01-25 10:03:05",

"display_name":"Test User",

"email":"test@test.net",

"locale":"en",

"allowed_private_forums":10505}



.. but still get the same "forum is private" error. Here is my url including SSO token for my latest attempt:

http://innovasys.userecho.com?sso_token="j6lFH53WSI63+0RVrrvmLOAo5ULNrRMNgJVfgtcFVSsr/2X+Z1dYSpCOXRQELbeMoonfOHTa8LhcP8Yj+6rttqzqJ3QGMlIz5o80EGGW3ucTlX1+sHEiss0p0FqnbEbHSyTzs28aq2tXmudkcLmxfc8nnsth1LD+kjVCKL9y7R/Yq2kjj72Cijld7CNy9IBqwAdg4Uehy0ZxQ58JeNRN/KA4wF2q3h0KT6hiPfNvIEi6c76CZlwXYTkHvy9lFI2/"
Avatar
Sergey Stukov co-founder
Post here your SSO_TOKEN we  validate it for you, also we prepare token validation link soon.