I'm trying to use a web service that uses OAuth2 for authentication, but wants the client id and secret in the POST body. APEX appears to send this in an HTTP Authorization header and I don't think this web service supports that. (I'm don't think this is exactly in line with the OAuth2 spec, but it is at least the second time I've come across a web service that only supports this.)
To be clear, when I use the credentials, what I get is this:
POST /api/v2/token
Authorization: Basic [base64 encoded client_id:client_secret]
Content-type: application/x-www-form-urlencoded
Accept: application/json
grant_type=client_credentials
and what I need is this:
POST /api/v2/token
Content-type: application/x-www-form-urlencoded
Accept: application/json
client_id=<client_id>&client_secret=<client_secret>&grant_type=client_credentials
Is there any way to get APEX to send the credentials in the POST body and not in an Authorization header when requesting an access token?