Connected App in MuleSoft
The Connected Apps feature provides a framework that enables an external application to integrate with Anypoint Platform using APIs through OAuth 2.0 and OpenID Connect
Connected apps help users delegate their access without sharing sensitive credentials or giving full control of their accounts to third parties.
In this tutorial we will demonstrate how can we create the connected app on anypoint platform
Features
- We can access the resources inside the anypoint platform using connected app
- We can use connected app to deploy the application on Cloudhub without passing the anypoint username and password
- We can create 200 connected in one organization
- Only organization administrators can access/update/delete/add the connected app
Open anypoint platform->click on Access management
Click on Create app and select App acts on its own behalf (client credentials) and add the scope to provide the access and next
We can see connected app is created, and we can copy client id and client secret
Generate auth token for further use
Go to postman trigger the below request to generate the token which will be used to access the resources and deploy the app using CICD on cloudhub, we will see that in next tutorials
curl –location –request POST ‘https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token’ \
–header ‘Content-Type: application/x-www-form-urlencoded’ \
–header ‘Cookie: XSRF-TOKEN=dO7yTh0l-mfR5dq6eSj-JsrPf1qYGa6qAOwc; _csrf=JqNfDhM24-g7jMtcZ2J6fXKR’ \
–data-urlencode ‘client_id=e5e756e61fdc4eb49eecb02d4da8f0ac’ \
–data-urlencode ‘client_secret=5240ac453A4A4fED946FAdb1DaDE14e4’ \
–data-urlencode ‘grant_type=client_credentials’