Sign In Register

How can we help you today?

Start a new topic
Answered

JoinChallengeRequest to a Public Challenge

I'm building a poker game,  and part of what I need to do is allow users to join a challenge.


I currently have a challenge that is set to PUBLIC


While using  Test Harness,  I make a call to JoinChallengeRequest

{

 "@class": ".JoinChallengeRequest",

 "challengeInstanceId": "54adceade4b05c5f261d81f7",

 "message": "I'm joinging!"

}


The result is always:


{
 "@class": ".JoinChallengeResponse",
 "error": {
  "JOIN": "NOT_AVAILABLE"
 },
 "scriptData": null
}


How do I allow players to join public Challenges at will?





Best Answer

Hi Marco,


I'm trying to get the same error as you but I'm drawing a blank. Can you post you CreateChallengeRequest and Response?


Here's my setup, maybe you can try it this way and tell me how you get on?


As User1:


 Request:

{
 "@class": ".CreateChallengeRequest",
 "accessType": "PUBLIC",
 "challengeShortCode": "pokerGame",
 "endTime": "2015-12-31T12:00Z",
 "startTime": "2015-10-31T12:00Z"
}

 

Response:

 

{
 "@class": ".CreateChallengeResponse",
 "challengeInstanceId": "54b39b0ee4b05c5f262a108d",
 "scriptData": null
}

 


The as User2:


Request:

 

{
 "@class": ".JoinChallengeRequest",
 "challengeInstanceId": "54b39b0ee4b05c5f262a108d",
 "message": "message"
}

 

Response:

 

{
 "@class": ".JoinChallengeResponse",
 "scriptData": null
}

 



Answer

Hi Marco,


I'm trying to get the same error as you but I'm drawing a blank. Can you post you CreateChallengeRequest and Response?


Here's my setup, maybe you can try it this way and tell me how you get on?


As User1:


 Request:

{
 "@class": ".CreateChallengeRequest",
 "accessType": "PUBLIC",
 "challengeShortCode": "pokerGame",
 "endTime": "2015-12-31T12:00Z",
 "startTime": "2015-10-31T12:00Z"
}

 

Response:

 

{
 "@class": ".CreateChallengeResponse",
 "challengeInstanceId": "54b39b0ee4b05c5f262a108d",
 "scriptData": null
}

 


The as User2:


Request:

 

{
 "@class": ".JoinChallengeRequest",
 "challengeInstanceId": "54b39b0ee4b05c5f262a108d",
 "message": "message"
}

 

Response:

 

{
 "@class": ".JoinChallengeResponse",
 "scriptData": null
}

 


yeah,  it started working for me.  I can't reproduce it anymore either.  Not sure what was going on.

Posting here as it may help someone.

When setting the start date for challenge note that its not localized timezone. If start date is not reached and if we try to join I saw "NOT AVAILABLE" response.

Login to post a comment