Workfront API Auth request (Machine to Machine Application) is returning 404 error

245 views Asked by At

I'm making an auth POST request to the https://example.my.workfront.com/integrations/oauth2/api/v1/jwt/exchange (note: actual request has 'example.my' subdomain replaced with the real Workfront subdomain for my org) endpoint with the required client_id, client_secret, and jwt_token values but receiving the following 404 response and error message in the Response:

{"statusCode":404,"error":true,"type":"Not Found","message":"Invalid Host"}

I searched the API docs and Workfront forum for any additional information on what could cause the error but had no luck. Does anyone know what is causing this error?

For context, this request seems to work fine from Postman on my local machine (i.e. auth token is returned) but fails on the server that is being used for this machine to machine application.

1

There are 1 answers

0
clydesdale On

The issue was that the request to the Workfront API was including the port in the host Header value, i.e. example.my.workfront.com:443.

Excluding the port so the host Header value is in the format example.my.workfront.com resolved the issue and provided the expected 200 response with auth token.