Log in to the admin portal and go to My Account > API Tokens:
https://app.mobilelocker.com/admin/tokens

Click New Token and give your token a name.

Copy the token value to your clipboard

If you are on a Mac or Linux machine, create a blank file in your home directory named .mobilelocker (it is a hidden file with a period at the front) and enter the following into it:

ML_API_TOKEN=YOUR_TOKEN_HERE

Save that file.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.