question

zakarywilson avatar image
zakarywilson asked

CreateServerMatchmakingTicket won't work, says invalidparams?,CreateServerMatchmakingTicket is saying invalid params?

I'm currently creating a function that adds a player to the queue, using .CreateServerMatchmakingTicket(), but for some reason it is saying

{
  code: 400,
  status: 'BadRequest',
  error: 'InvalidParams',
  errorCode: 1000,
  errorMessage: 'Invalid input parameters',
  errorDetails: {
    Members: [ 'The Members field is required.' ],
    QueueName: [ 'The QueueName field is required.' ],
    GiveUpAfterSeconds: [ 'The field GiveUpAfterSeconds must be between 5 and 3599.' ]
  }
}

What I don't understand, is why it does this when I have all of the data, my only assumption is an issue with the entity token, which I've noticed when I'm calling GetEntityToken(), data.Entity.Id is just my title ID, which I'm not sure if is right, given that when you Login with a custom ID, it returns a completely different entity ID.

The developer secret key is in the code too, so it's not that.

This is what I'm doing to add a player to the queue, sorry if the code is awful, normally Lua!

function AddPlayerToQueue(Player) {
    PlayFabAuthentication.GetEntityToken({}, (Error, Token) => {
        console.log(Token.data)
        if (Error === null) {
            PlayFabMultiplayer.CreateServerMatchmakingTicket({
                Entity: {
                    Id: Token.data.Entity.Id,
                    Type: Token.data.Entity.Type
                },
                GiveUpAfterSeconds: 300,
                Members: {
                    Player: {
                        Entity: {
                            Id: Token.data.Entity.Id,
                            Type: Token.data.Entity.Type
                        },
                    },
                },
                QueueName: "proqueue"
            }, (Err, Result) => {
                if (Err === null) {
                    console.log(Result)
                }
                else {
                    console.log(Err)
                }
            })
        }
    })
}


,
apisentitiesAuthenticationdataMatchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Rick Chen avatar image
Rick Chen answered

Sorry for the inconvenience. There was an incident affecting the matchmaking service at that time. It has been resolved. Could you please try again and confirm the issue is fixed?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.