Set Up your Personal Access Token (PAT)

Last modified: February 14, 2024

1 Introduction

Before running your first script, you need to set up your personal access token by creating a new token with the required scope and saving it to your computer as an environment variable.

2 Creating the Personal Access Token

For details on how to create your personal access token (PAT), see the Personal Access Tokens section of Mendix Profile.

Make sure you choose at least the following scopes:

  • Model Repositorymx:modelrepository:repo:write
  • Sprintr Project APImx:app:create and mx:app:delete

3 Saving the Personal Access Token as an Environment Variable

We do not recommend hard-coding your credentials (meaning, your PAT) into your script. Instead, you can save it as an environment variable with the name of a variable called MENDIX_TOKEN, and the Mendix Platform SDK will read it automatically.

Here is some useful information for setting the environment variable in different operating systems: