Page 1 of 1

Session Key help with Server. "Invalid Session Keys" Error

Posted: Fri Jun 12, 2020 9:09 am
by tig618
I am not sure I am using the Session Keys setting properly. Is there a reference I can use to dig a bit deeper into the Session Keys for PM library or something? I need to understand. Is there a specific encryption library or module that I need to research to get a better understanding of how to set it up?

Re: Session Key help with Server. "Invalid Session Keys" Err

Posted: Fri Jun 12, 2020 9:40 am
by Kent Briggs
You have to create a session key by calling AccountsSessionKey in the API. See the "Automated Logins" examples on this page:

http://www.briggsoft.com/docs/pmavens/API_Examples.htm

Re: Session Key help with Server. "Invalid Session Keys" Err

Posted: Sun Jun 14, 2020 11:46 am
by tig618
Kent Briggs wrote:You have to create a session key by calling AccountsSessionKey in the API. See the "Automated Logins" examples on this page:

http://www.briggsoft.com/docs/pmavens/API_Examples.htm
I have read the Automated Logins example. Am I supposed to use those examples and put them into the same folder as the server? If I am supposed to send them to the server to configure the Session Key, I don't understand how to do that. I did look at the EasyPHP program and it looks like it could help me here. Would I have to Install the Webserver on my VPS and the Devserver on my Local computer?

Re: Session Key help with Server. "Invalid Session Keys" Err

Posted: Sun Jun 14, 2020 12:01 pm
by tig618
I eventually want to integrate some Front End to my PMserver to add some pages but for now I just want to get things going so, would I then just add the API.php file to the same folder as PMServer.exe? When you say create a session key via the API, you do mean just the parameters right? Isn't the Session Key supposed to be coming from the client?

Re: Session Key help with Server. "Invalid Session Keys" Err

Posted: Sun Jun 14, 2020 12:54 pm
by Kent Briggs
tig618 wrote:I have read the Automated Logins example. Am I supposed to use those examples and put them into the same folder as the server? If I am supposed to send them to the server to configure the Session Key, I don't understand how to do that. I did look at the EasyPHP program and it looks like it could help me here. Would I have to Install the Webserver on my VPS and the Devserver on my Local computer?
If you want to automate logins using an API-generated session key, you need a web server installed somewhere to host a web page where players will enter their credentials. The web server (IIS, Apache, etc) could be on the same machine as Poker Mavens or it could be anywhere else. You'll need PHP or some other web scripting language installed on your web server to collect the credentials and make the API call to the poker server. The folder where you install your PHP code needs to be somewhere accessible by your web server.

Re: Session Key help with Server. "Invalid Session Keys" Err

Posted: Mon Jun 15, 2020 3:57 pm
by tig618
Kent Briggs wrote:
tig618 wrote:I have read the Automated Logins example. Am I supposed to use those examples and put them into the same folder as the server? If I am supposed to send them to the server to configure the Session Key, I don't understand how to do that. I did look at the EasyPHP program and it looks like it could help me here. Would I have to Install the Webserver on my VPS and the Devserver on my Local computer?
If you want to automate logins using an API-generated session key, you need a web server installed somewhere to host a web page where players will enter their credentials. The web server (IIS, Apache, etc) could be on the same machine as Poker Mavens or it could be anywhere else. You'll need PHP or some other web scripting language installed on your web server to collect the credentials and make the API call to the poker server. The folder where you install your PHP code needs to be somewhere accessible by your web server.
So then, the API call made by the web page that accepts the players credentials is essentially performing the same action as the normal login box when accessing the site and just take them right into the Lobby right? I don't want users to have to login twice.

Re: Session Key help with Server. "Invalid Session Keys" Err

Posted: Mon Jun 15, 2020 4:18 pm
by Kent Briggs
tig618 wrote:So then, the API call made by the web page that accepts the players credentials is essentially performing the same action as the normal login box when accessing the site and just take them right into the Lobby right? I don't want users to have to login twice.
Yes. Once you've confirmed their credentials (by whatever means you choose), you call AccountsSessionKey in the API to create and assign a single-use session key to their account. You pass that key as a URL parameter (along with their player name) to the poker server URL, which logs them in. The client startup parameters are documented in the help file and also online here:

http://www.briggsoft.com/docs/pmavens/T ... tartup.htm

Re: Session Key help with Server. "Invalid Session Keys" Err

Posted: Mon Jun 15, 2020 4:41 pm
by tig618
Ok. Thanks for the assistance.