question

tnppresentation avatar image
tnppresentation asked

Full example of REST api to register new player

My customer whats to implement a flutter app and integrate into PlayFab. As far as I can see there is no flutter sdk. I was hoping to use REST API. But I cannot figure out how to register a user with email password. How do I authenticate the app to access the REST API. If its apiKey based where do I secuerly store it in the moble app code.

apis
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

·
Neils Shi avatar image
Neils Shi answered

Currently, PlayFab doesn't offer an SDK for flutter, so you need to send HTTP requests. To register an account with email password, you can use API RegisterPlayFabUser to complete the registration, and then use the API LoginWithEmailAddress to log in with your email and password. Alternatively, you can register an account using the API about anonymous login(like LoginWithCustomID), and then use API AddUsernamePassword to add recoverable login credentials to the anonymous account, this account can also be logged in using API LoginWithEmailAddress. For more detail, you can refer to Login basics and best practices. As with other SDKs, you can access the REST API directly. Our apiKey is based on X-EntityToken/X-Authorization which will expire after a certain period of time, so you don't have to worry about security.

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.