Skip to main content
July 11, 2024
Question

Oauth 2 - Missing HTTP Content-Type header

  • July 11, 2024
  • 1 reply
  • 0 views

Hello,

It is currently not possible to use OAuth 2 Client Credentials to authenticate towards Appian for one of our connected systems.
.

The following request is made to create the token:

POST /suite/authorization/oauth/token?grant_type=client_credentials HTTP/1.1
Host: ...
User-Agent: Go-http-client/1.1
Content-Length: 0
Authorization: Basic ....
Accept-Encoding: gzip

  • The grant_type is passed as query parameter
  • No Content-Type HTTP header is present (The body is empty)

Appian returns an error, because it expects the Content-Type HTTP header to be present:

{"error_description":"Missing HTTP Content-Type header","error":"invalid_request","error_uri":"https:\/\/docs.appian.com\/suite\/help\/24.1\/Web_API_Authentication.html#client-credentials"}

Can the check be changed in Appian, so that the header Content-Type is not required if the body is empty?

1 reply

karumurua531442
July 12, 2024

hi [mention:eca60d8c500b4f248ef41ffc72fdfb95:e9ed411860ed4f2ba0265705b8793d05]  AFAIK  you should include the Content-Type header in your request, even if the body is empty.