Set Up your Personal Access Token (PAT)
Last modified: August 19, 2024
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.
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 Repository –
mx:modelrepository:repo:write
- Sprintr Project API –
mx:app:create
andmx:app:delete
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:
- Create and Modify Environment Variables on Windows
- Setting up Environment Variables in MacOS
- How to Set Environment Variables in Linux