After the App Registration is completed, you can now connect your client app to Moovila.
The following illustration is an overview of the steps within an OAuth Authorization Flow.
First, to access the Moovila API endpoints, the application you’re building or connecting Moovila to (the “Client”) will need to initiate the authentication request as illustrated above (Step 1).
When configuring the Client to send the requests with the appropriate scopes, the requested scopes must match those selected within the App Registration. The scopes would be listed together as a space-separated list of selected values. Here are the various scopes available.
| Moovila Data Element | Read |
| Projects and Tasks | ProjectTaskRead |
| Users | UsersRead |
| Time Entries | TimeEntriesRead |
| Lookup Tables | LookupTablesRead |
This authentication request would be performed against the “Authorization URL” listed in the App Registration edit screen. This would initiate the authentication process and present the login modal screen to the end user to sign into Moovila as noted in Step 2.
Once the user has authenticated and authorized the Client to access the Moovila data scoped in the App Registration, then Moovila will issue an Authorization Code to the Client which the Client should persist for future requests (Steps 3 and 4).
To now receive an Access Token from Moovila to be used going forward, the Client must now send to the Token URL the Authorization Code it just received, along with the Client ID and Client Secret presented in the Moovila App Registration edit modal (Steps 5-7). This token will allow for calls to the Moovila API for retrieving data using the data authorization profile of the authenticated user.
After a while, the initial token the client received will expire, so the client will need to request a refresh for the token. This is done through the same Token URL but using a different grant type parameter value and the Refresh Token to get a new Access Token.
For more information, visit the Creating an App Registration in Moovila and Moovila OAuth Integration Code Example articles.
Comments
0 comments