This content has been marked as final. Show 5 replies
What did you use to get the authentication session and generate the token ? Any particular language ?
And, did you copy the account shared secret from the dev-portal to your application ?
Can you get a trace of the HTTP requests going from your client to the server ? Or send us info about your account so that I can check what's happening server-side ?
(sorry for the many questions but the stack trace doesn't really tell me much :)
I used the code from SDK/extras/scripts/groovy/cocomo.groovy.
def am = new AccountManager(<ACCOUNT_URL>)
def session = am.getSession(<ROOM_NAME>)
session.getAuthenticationToken(<SHARED_SECRET>, ARBITRARY_NAME_STRING, ARBITRARY_ID_STRING, ARBITRARY_ROLE_STRING)
In flex I use the generated token and firebug shows the following request:
Here is the response:
<status code="error" subcode="for-input-string:-"test""/>
Ah! I think I found what the problem is!
You are passing "test" as the role, when it should be a number (0-100).
I should have made it more explicit in the API (and I'll fix them for next release) but the value you pass is the numeric value expected by cocomo (passed as a string, since I am just passing it as part of the ticket)
I wish the error was more useful (it's the message from a conversion exception, and I thought I tried that ):
Sorry for the inconvenience...
Great, that fixed it!
btw. Is there any mapping of roles/rights to those number values?
When using 0 or 1 I get a Permission Exception
Error: MessageManager.createNode : insufficient permissions to create node
Using 100 and everything works fine.
Thanks for the quick help...
The idea here is that only UserRoles.OWNER (which does == 100) can create new CollectionNodes in a room. Most collaboration components (Chat, SharedWhiteboard, etc) add CollectionNodes to the room when they are first run, in order to publish and subscribe data messages. Once a CollectionNode has been added to a room, it's permanently there, so subsequent users can use it without needing to be an OWNER.
hope that helps