Page 1 of 1

api Login and Open Table automatically

Posted: Sat Sep 26, 2009 11:15 am
by CanadaWest
Experimenting with opening tables automatically on login.

I can't get api to both Login AND Open and table.

eg. http/..url..?LoginName=Aces123&SessionKey=123456asdfg&TableName=Big Weekly Tourney - Table 3&TableType=T&TablePassword=xyz123

Doesn't work.

Re: api Login and Open Table automatically

Posted: Sat Sep 26, 2009 11:37 am
by Kent Briggs
CanadaWest wrote:Experimenting with opening tables automatically on login.
I can't get api to both Login AND Open and table.
eg. http/..url..?LoginName=Aces123&SessionKey=123456asdfg&TableName=Big Weekly Tourney - Table 3&TableType=T&TablePassword=xyz123
Doesn't work.
You probably just need to URL Encode your parameters so that the spaces are turned in %20 and other reserved characters are encoded also. Remember to encode them individually. If you do the entire line then the required ampersands in between will get encoded also. You likely only need to encode the TableName parameter.

Re: api Login and Open Table automatically

Posted: Sat Sep 26, 2009 6:51 pm
by CanadaWest
nope, tried that.

and tried using a table name with no spaces or reserved characters.

Re: api Login and Open Table automatically

Posted: Sat Sep 26, 2009 8:54 pm
by Kent Briggs
CanadaWest wrote:nope, tried that.
and tried using a table name with no spaces or reserved characters.
Are you calling AccountsSessionKey first to get a valid session key? Are you doing this by hand via your browser or all via code? I have no problem doing it by hand. First I typed this into my browser address bar:

http://192.168.1.100:8087/api?command=a ... player=pm1

and got this result:

Result=Ok
Player=pm1
SessionKey=BE03FAD4B67FC9ED30AF

Then I did this:

http://192.168.1.100:8087/?LoginName=pm ... Password=x

And it logged me in and opened table 3 of a tournament name Tournament 3 with a password of x.