External systems can send data to Movilitas.Cloud through the API of the given Movilitas.Cloud application. These external systems must be authenticated first so that they can communicate with Movilitas.Cloud.


For authentication, you must get a token in one of the following ways:


Token TypeHow to Get the Token?Expiry
Dynamic1. Create an API key and secret.
2. Request the token through the Authentication API by using the API key and secret.
Valid for one day. Reauthentication is required.
Static1. Create an API key and secret.
2. Generate the token on the API Keys page, next to the API key and secret.
No expiry date. You can revoke it and generate a new token at any time.


The authentication token is needed for each API call that is sent to Movilitas.Cloud.


Although Movilitas.Cloud accepts a static token for authentication, we recommend you to use a dynamic token to comply with the highest security standards.


Note: Dynamic tokens cannot be used when you want to send CRPT OMS messages to Movilitas.Cloud.


This article describes:

  • How to manage API keys that are essential to get the authentication token (both dynamic and static).
  • How to manage static tokens.


List of Procedures


Creating an API Key

You must create an API key in Movilitas.Cloud, independently of the token type you want to use.


Procedure


1. Go to Movilitas.Cloud Console --> My tenants.

2. Select the tenant or click Open tenant next to it.

3. On the Tenant Dashboard, select the API keys tab. The application displays the list of API keys generated for the tenant.



4. Click the + icon (Create API key). The application displays the Create API key form with the automatically generated API key.



To copy the API key to your clipboard, click the Copy icon next to the API key. You can use the API key to get a dynamic token for API communication.


5. Specify a name and an API secret.


Note: The password must be a minimum of 8 characters long. It must include at least one uppercase letter, lowercase letter, number, and special character. Keep the API secret in a safe place because you will need it along with the API key when sending an authentication request over API to get a dynamic token.


6. Click Create.


Back to the list of procedures


Copying an API Key to Your Clipboard

You will need the API key when you want to use a dynamic token.


Procedure


1. Go to Movilitas.Cloud Console --> My tenants.

2. Select the tenant or click Open tenant next to it.

3. On the Tenant Dashboard, select the API keys tab. The application displays the list of API keys generated for the tenant.



4. Click the Copy icon next to the API key.


The API key is copied to your clipboard and you can use the API key to get a dynamic token for API communication.


Back to the list of procedures


Editing an API Key


Procedure


1. Go to Movilitas.Cloud Console --> My tenants.

2. Select the tenant or click Open tenant next to it.

3. On the Tenant Dashboard, select the API keys tab. The application displays the list of API keys generated for the tenant.

4. Click the edit icon next to the API key you want to modify. The application displays the Update API key form and the Static token panel.



5. Modify the API key name or the API secret, as needed.


To copy the API key to your clipboard, click the Copy icon next to the API key. You can use the API key to get a dynamic token for API communication.


6. Click Update.


Back to the list of procedures


Generating a Static Token

After you create an API key, you can generate a static token. Also, after you revoke all the tokens for the API key, you can generate the static token again.


Note: If you want to send CRPT OMS messages to Movilitas.Cloud over API, you must use static tokens. For other use cases, the static token is an alternative to dynamic tokens and you can decide which one to use.


Procedure


1. Go to Movilitas.Cloud Console --> My tenants.

2. Select the tenant or click Open tenant next to it.

3. On the Tenant Dashboard, select the API keys tab. The application displays the list of API keys generated for the tenant.

4. Click the edit icon next to the API key you want to modify. The application displays the Update API key form and the Static token panel.


Example:



5. Click Generate Static Token. The application generates and displays the static token.


To copy the static token to your clipboard, click the Copy icon next to the token. You can use the token for authentication when sending API requests to Movilitas.Cloud.


Example:




Back to the list of procedures


Retrieving the Static Token

Once a static token has been generated, and you revisit the API key page, the static token is not displayed for security reasons. You need to retrieve it from the database and then you can copy the token to your clipboard.


Procedure


1. Go to Movilitas.Cloud Console --> My tenants.

2. Select the tenant or click Open tenant next to it.

3. On the Tenant Dashboard, select the API keys tab. The application displays the list of API keys generated for the tenant.

4. Click the edit icon next to the API key you want to modify. The application displays the Update API key form and the Static token panel.


Example:



5. Click Retrieve Static Token.


To copy the static token to your clipboard, click the Copy icon next to the token. You can use the token for authentication when sending API requests to Movilitas.Cloud.


Example:



Back to the list of procedures


Revoking the Static Token

You can revoke the static token generated for the API key. By revoking the static token, you also revoke all the dynamic tokens generated for the API key to date.


Procedure


1. Go to Movilitas.Cloud Console --> My tenants.

2. Select the tenant or click Open tenant next to it.

3. On the Tenant Dashboard, select the API keys tab. The application displays the list of API keys generated for the tenant.

4. Click the edit icon next to the API key you want to modify. The application displays the Update API key form and the Static token panel.


In the following example, we have a static token generated for the API key:



5. Click Revoke Static Token. The application displays a confirmation window informing you that you are going to revoke all the tokens (static and dynamic) by confirming the action.



6. Click Yes.



Back to the list of procedures


Deleting an API Key


Procedure


1. Go to Movilitas.Cloud Console --> My tenants.

2. Select the tenant or click Open tenant next to it.

3. On the Tenant Dashboard, select the API keys tab. The application displays the list of API keys generated for the tenant.

4. Click the delete icon next to the API key you want to remove and confirm the deletion.


Back to the list of procedures