curl --location --request GET 'https://anypoint.mulesoft.com/exchange/api/v2/organizations/<orgID>/applications/<API ID>/contracts' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>
{
"status": 403,
"message": "Unauthorized",
"details": {}
}
IMPORTANT NOTE: This solution would only work if MFA is disabled for the User. Since August 1st, 2023, MuleSoft customers need to enforce MFA on all users. Refer to SOLUTION 2 below to use Connected App acting as its own (client credentials).
curl --location --request POST 'https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token' \
--header 'Content-Type: application/json' \
--data-raw '{
"grant_type": "password",
"response_type": "token",
"username": <username>,
"password": <password>,
"scope": <configured_scope_for_the_client_app>,
"client_id": <connected_app_client_id>,
"client_secret": <connected_app_client_secret>
}'
curl --location --request GET 'https://anypoint.mulesoft.com/exchange/api/v2/organizations/<orgID>/applications/<API ID>/contracts' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>
Refer to the KB Article ConnectedApps-How to Manage Existing Client Applications and ensure the Connected App has Managing permission on the Client Application.
Once this permission has been given, the call in the SYMPTOM section should be successful.
Note, the minimum Connected App scopes are:
001120307

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.