Set Up your Personal Access Token (PAT)
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 Repository –
mx:modelrepository:repo:write
- Sprintr Project API –
mx:app:create
andmx: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:
- Create and Modify Environment Variables on Windows
- Setting up Environment Variables in MacOS
- How to Set Environment Variables in Linux
Feedback
Was this page helpful?
Glad to hear it! Thank you for your response.
Sorry to hear that. Please tell us how we can improve.