When you try to connect Bitbucket to platform using integration you get the following error in platform.sh console once you fill the Repository name, App credential Key and App Credential Secret
“The server could not comply with the request. It is either malformed or otherwise incorrect”
curl -X POST -u "KEY:SECRET" https://bitbucket.org/site/oauth2/access_token -d grant_type=client_credentials
That should return something like the below
``“error”: “invalid_grant”, “error_description”: “Cannot use client_credentials with a consumer marked as "public". Calls for auto generated consumers should use urn:bitbucket:oauth2:jwt instead.”}`
In Bitbucket if you don’t select This is a private consumer when you add a consumer this issue happens. So make sure to select it.