Get an Access Token

To create a Playfix account, you first need to generate an access token by sending a POST request to the /auth/accounts path of the Playfix API, calling the :sendEmailConfirmation method.

Get access token.

POST https://api.playfix.io/auth/accounts:sendEmailConfirmation

Request Body

Name
Type
Description

email*

Your email address.

{

}

The example below shows how to get an auth token via email.

Example cURL Call

curl --request POST
  --url 'https://api.playfix.io/auth/accounts:sendEmailConfirmation' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "<your_email@example.com>"
  }'

Example Python Call

import requests
import json

payload = {
    "email": "<your_email@example.com>"
    }
r = requests.post(
    "https://api.playfix.io/auth/accounts:sendEmailConfirmation",
    headers = {
        "Accept": "application/json",
        "Content-Type": "application/json"
        },
    data = json.dumps(payload)
    )

print(r.text)

Request Body

  • email - The email address you want to use to register for a Playfix account.

Replace "<your_email@example.com> in the example with your email address.

Response

{
}

This operation sends a link containing your access token to the email address provided in the request.

Take note of the access token and save it somewhere. It will be required to authenticate requests to the Playfix APIs.

You must perform the "Register an Account" operation before you can use the access token to authenticate Playfix API requests.

Last updated