question

Philip Alexander Prates Machado avatar image
Philip Alexander Prates Machado asked

How to make an entity key in C++

I am currently trying to call "getMatch()" in the server, since the server has no login it throws the error "You must call GetEntityToken API method before calling this function"

I am assuming i need to create this token with a json containing my developer secret key(?), my issue is that i have no idea how to create an actual Json in c++ and i cant find anything on google.


If you could post a code snipet calling "GetEntityToken" in C++ it would be much apreciated, or at least an example on how to fill "FGetEntitytokenRequest request; request.entity = ???;".

Also, what information would you put in the "type" and "typeString" fields of the entity?

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

·
Citrus Yan avatar image
Citrus Yan answered

First of all, if you already have the secret key set, and, even leaving the FGetEntitytokenRequest empty, you should still be able to get the title entity token. Moreover, to answer your question, "type" and "typeString" should be "title", and "id" should be your title id string.

7 comments
10 |1200

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

Philip Alexander Prates Machado avatar image Philip Alexander Prates Machado commented ·

I dont have the secret key set, i was under the impression that you should never use that in the client for security reasons is that not correct?

So i would still need to request a token right?

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Philip Alexander Prates Machado commented ·

I was assuming that you are doing it on the server side since you mentioned "I am currently trying to call "getMatch()" in the server". And, in the client side, you should use the player's entity token received from login calls to call GetMatch to get the match info for the specific player. Could you please clarify your scenario so that I can have a better understanding of what you're trying to achieve?

0 Likes 0 ·
Philip Alexander Prates Machado avatar image Philip Alexander Prates Machado Citrus Yan commented ·

I am calling it on the server side. i will be specific.

I have a UE4 .exe running on your backend that is trying to call get match inside a #if UE_SERVER so that the players have absolutely no chance of messing with the system (can never be too safe), when the server spawns i am just trying to call "GetMatch()" so that i have acess to the players in the game, theyr MMR and the teams for each player.

I already got the game id from the GSDK.

The idea is that the players pass their ID as an argument to the server and then since i got all that info from the getmatch call i can sort them into the correct teams and display each team's MMR, this will also come in handy because i will need to update their MMR when they game ends acording to the result and the oposing teams MMR.

0 Likes 0 ·
Show more comments
Show more comments

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.