Docuware REST API Integration - application/x-www-form-urlencoded custom body

Hello,

I am trying to build the connection to Docuware. It uses the OAuth2.0, grant type password, sent in request as http body which is x-www-form-urlencoded.

In Postman I've successfully tested the request with http header Content-Type: application/x-www-form-urlencoded and parameters set as on a below screenshot and retrieved the access_token in a response from token URL.

The access token response in Postman looks like this, with the valid access token:

{
"access_token": "{{accesstoken}},
"expires_in": 3600,
"token_type": "Bearer",
"scope": "docuware.platform"
}

In Celigo I defined OAuth2.0 iClient with the same token URL and overriden the request body as JSON:

My override http body in Celigo:

{
"grant_type": "password",
"scope": "docuware.platform",
"client_id": "docuware.platform.net.client",
"username": "{{{iClient.oauth2.username}}}",
"password": "{{{iClient.oauth2.password}}}"
}

In Celigo I tried to set the connector with access_token path specified and also without (as suggested by Celigo - this response is default format so parser is pre-set to retrieve the token automatically).
For the application API requests the token should be in Authorization header as Bearer, what I have also set.
But somehow when I see the Celigo application request header it looks like this in the end, so I am not able to authorize for Docuware web services:
Possible error cause are IMHO these two points:
Authorization fails on retrieving access token
OR
Access token is retrieved, but Celigo is not able to parse it from the response.
My connection says it is Online, with a green indicator, but I don't know which level of connection this actually represents.
I am not able to see any detail or logs of the OAuth 2.0 authorization step to retrieve token so I don't know how to troubleshoot this. No Auth step response visible in Celigo.
Could anyone help me, please? I am lost...:(
Thank you for any advise!

@kristynamachasverako did you get this working? Also, can you try using password credentials?

Hello @tylerlamparter,

the Password credentials was my first try, but this authentication method requires (beside the username and password) also client ID and client secret, which we don't have from Docuware. I will try to find out if we are able to obtain such detail.

I will update the thread when we have some progress.

@kristynamachasverako I didn't notice you didn't have a client secret so it makes sense to use the override like you did. Can you also try HTTP>auth type = token>enable refresh token> setup refresh token mechanism with this setup?

Hello @tylerlamparter,

I've just tried this and I know exactly what you mean. I got in a trouble, because the refresh token endpoint is only possible to set using the relative path within the same server/base URI. My token endpoint is completely out of application URI and I am not able to use the full endpoint definition for authentication request with this type of setup.

On one side it makes sense that this type of connection consumes two connector licenses, on the other side it's not that much non-standard that authentication server is out of the application tenant itself and does not share the same host. So I still hope there is a way to have this set up. I will be in touch with your technical colleague from my area so I will update the thread if we figure this out as a reference for others running into a same trouble.

@kristynamachasverako the "relative uri" path on the refresh token setup allows a full path even though the name of the field is "relative" and the text underneath shows the base uri. The help text and kb for that field mention the ability to use a full uri, but the field title definitely doesn't make it clear.

Also not sure what you mean about this consuming multiple connection licenses.

Hello @tylerlamparter, I confirm this approach worked. I will write down some summary for others who might run into a same issue and will post it here later today.

Thank you!!! Got it to work with the suggested approach by @tylerlamparter but still would appreciate your summary for reference @kristynamachasverako.