PlayFab API

The PlayFab API plugin integrates the JavaScript SDK for the PlayFab service into your Construct 3 or Construct 2 applications. It is a requirement to run any other plugins in the PlayFab Master Collection.


With this plugin, you are able to take advantage of all account and networking system features available in PlayFab into your game application. You are then able to start calling PlayFab methods, or use the collection plugins to do them for you.


It is required to include this plugin into your project before using any other PlayFab plugins.

PlayFab API v2.png

Introduction

Step 1.png

The Construct Master Collection supports the full and easy integration of the PlayFab service for both Construct 3 and Construct 2.


Please click here to learn more about PlayFab.

Features


Here are some of the features of the PlayFab service:

  • Account management

  • Account information system

  • Authoritative server

  • Studio and game systems.

  • Game application data, shared across all users.

  • Studio applications data, shared across all games and users under a studio.

  • User game data

  • User studio data

  • Authentication

  • Email, username, password or company login

  • Cryptography or custom identification

  • Android login

  • iOS login

  • Apple Sign In

  • Authentication linking, able to add or remove authentication methods.

  • Social connect authentications

  • Leaderboards

  • Leaderboards with social connect to Steam and Xbox games

  • Email management system

  • Analytics

  • Advertisement implementation, with compliant advertising.

  • Google AdSense

  • Google AdMob

  • IronSource ad-network mediation

  • Player management

  • Player information system

  • Server clock, time management features

  • Friend management, sync features with friends.

  • Store features, including catalogs and inventories.

  • Currencies, both virtual and real monetary currencies.

  • In-App Purchases and In-App Billing support.

  • Content Delivery Network (CDN)

  • Cloud Script, easily write your own personalized server scripts in JavaScript.

  • Photon Realtime, a cloud based multiplayer plugin, with full PlayFab integration.

  • Photon Chat, a cloud based multiplayer chat plugin, with full PlayFab integration.


For more information about all the integrated PlayFab service features, please click here to learn the introductory lessons to PlayFab.


Editor Features


Here are some of the features in the Construct editor:

  • All platforms support, including web, mobile and desktop.

  • Construct 3

  • Construct 2

  • Native mobile integration

  • Construct 3 mobile app build service support.

  • Android Studio

  • Xcode

  • Cordova CLI

 
 

How to use?

It is easy to use the PlayFab API plugin, you will only need to follow the steps below.


1. Add the PlayFab API addon into your project.



2. Log in to your PlayFab account, or sign up if you do not have one yet.


3. Then, create a project and copy its title id.




4. From your Construct 3 project, click the PlayFab API object.


5. Then, go to the Properties Bar while the object is selected. This will show the Title Id property where you will input the value from the one in your PlayFab Console.


6. Finally, set the other plugin properties.

  • Debug Mode - allows the PlayFab Master Collection to make logs of the response JSON data from the PlayFab servers. This is very important when it comes to debugging received server data. The logs are accessible through the Developer Console, which is launched by pressing (F12) during preview.

  • Client Profile Data - are additional data you want included in the response callback from the PlayFab servers. This is only ran when the server allows that type of response for the command.

  • Client Sensitive Data - are additional sensitive data you want included in the response callback from the PlayFab servers. This is only ran when the server allows that type of response for the command. Compared to the Client Profile Data, these server responses are sensitive, therefore should be taken precaution before allowing to be received by the client.

7. Finally, you can now use the PlayFab API object, and include more PlayFab addons for more features.


 

Documentation

There is currently nothing to show, we will add more in the future.

Actions, Conditions & Expressions

Actions

Actions
Actions

The actions for the PlayFab API plugin.

press to zoom
Actions
Actions

The actions for the PlayFab API plugin.

press to zoom
1/1

The following action groups:

  • General

  • PlayFab API

  • Logout - Forget all credentials and any previous authentications are logged out.

  • Set Title Id - Set the Unique identifier for the Application Title.

  • This is found on your PlayFab Console.

  • You can set this on the Properties Bar.


  • Call API Method - Call a Client API method from PlayFab.

  • Method - The method key from the PlayFab Client API documentation.

  • Data (JSON) - The request data to pass with the api method call, in JSON string.

  • Custom Data (JSON) - The custom data to pass with the api request, in JSON string.


Conditions

The following condition groups:

  • General

  • PlayFab API

  • Initialization

Conditions
Conditions

The conditions for the PlayFab API plugin.

press to zoom
Conditions
Conditions

The conditions for the PlayFab API plugin.

press to zoom
1/1
  • Is Logged In - Condition to check if the current user has authenticated to enable user-based PlayFab API features.

  • Is Initialized - Condition to check if the API is already loaded and available.

  • To be safe, check this initially when the application first starts before starting the PlayFab service.​

  • You only have to check for this once, usually when your application starts.


  • On Call API Response - Trigger fires if a Call API Method succeeded with a response from the PlayFab server.

  • On Call API Error - Trigger fires if a Call API Method received an error from the PlayFab server.

Expressions

Expressions
Expressions

The expressions for the PlayFab API plugin.

press to zoom
Expressions
Expressions

The expressions for the PlayFab API plugin.

press to zoom
1/1

The following expressions groups:

  • General

  • PlayFab API

  • GetTitleID- Return the title id declared in the plugin properties.

  • Response- Return the response data from the recent On Call API Response or On Call API Error, in JSON string.

Object   Properties

Plugin Properties

press to zoom

press to zoom
1/1

The following properties groups:

  • Configuration

  • The setup for the plugin while running.

  • Client Profile Data

  • Additional Profile Data to be included for each request. Match with the PlayFab Console > Client Profile Options.

  • Client Sensitive Data

  • Additional Sensitive Profile Data to be included in each request. Match with the PlayFab Console > Client Sensitive Profile Options.

Configuration - The setup for the plugin while running.

  • Title Id - Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected.

  • Debug Mode - If Enabled, the runtime will log errors across all plugin modules. This should be Disabled on production.

Client Profile Data - Additional Profile Data to be included for each request. Match with the PlayFab Console > Client Profile Options. ​

  • Avatar URL - Whether to show player's avatar URL.

  • Banned until Time - Whether to show the banned until time.

  • Campaign Attributions - Whether to show campaign attributions.

  • Creation Date - Whether to show the created date.

  • Last Login Time - Whether to show the last login time.

  • Locations - Whether to show player's locations.

  • Origination - Whether to show origination.

  • Statistics - Reserved for future development.

  • Tags - Whether to show tags.

  • Values to Date in USD - Whether to show the total value to date in usd.

  • Values to Date - Whether to show the values to date.

​​ Client Sensitive Data - Additional Sensitive Profile Data to be included in each request. Match with the PlayFab Console > Client Sensitive Profile Options.

  • Linked Accounts - Whether to show the linked accounts.

  • Push Notification - Whether to show push notification registrations.

  • Contact Email Address - Whether to show contact email addresses.

Showcase

There is currently nothing to show, we will add more in the future.

Game Projects 

Instructions Kit

Construct 3 Project
Construct 3 Project

press to zoom
Construct 2 Project
Construct 2 Project

press to zoom
Construct 3 Project
Construct 3 Project

press to zoom
1/2

Specifications

  • Instructions - The game project contains instructions and steps on how to use the addon and its features.

  • Action, Conditions and Expressions - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks on the recommended ways of using the addon.

Supporters

Only