Grant Project Access

To grant an app access to a project, send a POST request to the /auth/apps endpoint, calling the :grantProjectAccess method.

Grant project access.

POST https://api.playfix.io/project/<project_name>:grantProjectAccess

Path Parameters

Name
Type
Description

project_name*

String

The name of the project you want to grant the app access to. This begins with projects/ followed by a ULID.

Headers

Name
Type
Description

Authorization*

String

The account-level access token.

Bearer <your_access_token>

Request Body

Name
Type
Description

app*

String

The app name.

{

}

Example cURL Call

curl --request POST \
  --url 'https://api.playfix.io/project/<project_name>:grantProjectAccess' \
  --header 'Authorization: Bearer <your_access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "app": "<app_name>"
  }'

Example Python Call

import requests
import json

payload = {
  "app": "app_name"
  }

r = requests.post(
  "https://api.playfix.io/project/<project_name>:grantProjectAccess",
  headers = {
    "Authorization": "Bearer <your_access_token>",
    "Accept": "application/json",
    "Content-Type": "application/json"
    },
  data = json.dumps(payload)
  )
  
print(r.text)

Response

{
}

After granting the app access to a project, you can get a new access token that allows a user to access resources for that project alone.

Last updated