Solved How Authentication is done with a Bearer token

Status
Not open for further replies.

Thomas Six

Platinum Partner
Advanced Certified
Joined
May 31, 2017
Messages
133
Reaction score
44
We need to make a crm template to connect to our crm. Authentication is done with a Bearer token. This will be send in the Request header. How can I add this in the xml template? I've tried with the 3cx crm integration wizard, and selected basic authentication with API key (no option for bearer token). But that's not working.
When I try, I receive this error message
Server returned a non successful status code - HTTPStatusCode=InternalServerError - Reason=Internal Server Error - Content={ "statusCode": 500, "message": "Internal server error", "activityId": "a3884aa2-09e3-4141-a747-c9c5a84d3e81" }

With postman it's working. Where can I find the log files for this? Someone who has already created an XML template with a bearer token
 
Hello,

I do think that the default "Zendesk V2" does work with a Bearer token.
You can select the CRM, and klick the 'Show Template', to get some information on how this is done (headers).

Paulo
 
Zendesk V2 is working with oAuth
 
Ahh okay, my bad :)
Sorry about this.
 
You can check the ConnectWise template to see how you can add a custom header to your request. Then select No for the Authentication element:
<Authentication Type="No" />

In your case, the header should be "Authorization", something like this:
XML:
<Request Url="YOUR_CRM_URL" ...otherattributes>
    <Headers>
        <Value Key="Authorization">Bearer TOKEN</Value>
    </Headers>
</Request>

There, the TOKEN can also be taken from a configuration parameter, so you can change it from the UI when needed:
XML:
<Request Url="YOUR_CRM_URL" ...otherattributes>
    <Headers>
        <Value Key="Authorization">Bearer [TOKEN_FROM_CONFIG]</Value>
    </Headers>
</Request>
 
  • Like
Reactions: Evolute IT
You can check the ConnectWise template to see how you can add a custom header to your request. Then select No for the Authentication element:
<Authentication Type="No" />

In your case, the header should be "Authorization", something like this:
XML:
<Request Url="YOUR_CRM_URL" ...otherattributes>
    <Headers>
        <Value Key="Authorization">Bearer TOKEN</Value>
    </Headers>
</Request>

There, the TOKEN can also be taken from a configuration parameter, so you can change it from the UI when needed:
XML:
<Request Url="YOUR_CRM_URL" ...otherattributes>
    <Headers>
        <Value Key="Authorization">Bearer [TOKEN_FROM_CONFIG]</Value>
    </Headers>
</Request>
[/QUOTE]
 
  • Like
Reactions: KyriacosS_3CX
Status
Not open for further replies.