Quamotion Cloud uses Azure Active Directory and OAuth for authentication. To authenticate yourself with Quamotion Cloud, you will first need to obtain a JWT token from Azure Active Directory, and then present that token to Quamotion Cloud when you issue a request.

When requesting a token, make sure you specify as the resource URL, and use as the authority.

Please note that the resource URL is and not Authentication with Quamotion Cloud will fail if the resource URL does not include the trailing /.


When developing scripts in Python, you can use the following sample code to obtain an access token:

import adal

# It is _super_ important the / is at the end of the URL; it is part of the audience!
resource = ''
client_id = os.environ['AGENT_API_USER']
client_secret = os.environ['AGENT_API_PASSWORD']
context = adal.AuthenticationContext('')

token = context.acquire_token_with_client_credentials(resource, client_id, client_secret)
accessToken = token['accessToken']

Once you have obtained your access token, you can use this access token in the authorization header of your HTTP requests:

import requests

headers = { 'Authorization': 'Bearer ' + accessToken}
r = requests.get("", headers=headers)
Last modified October 25, 2019: Move docs to docs/ (519bf39)