Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Web Credential with client id and secret in POST body?

Eric Olson 1Feb 25 2025

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?

Comments
Post Details
Added on Feb 25 2025
5 comments
1,177 views