Integration with SelectLine CRM

Status
Not open for further replies.

Rudolf_Exima

Free User
Joined
Apr 5, 2023
Messages
1
Reaction score
0
We are trying to integrate SelectLine CRM with 3CX. The authentication to SelectLine's API is a two step function: sending 4 Elements as parameter of a POST: username, password, type of login, API-Key. On the return we receive in a JSON two values: AccessToken and TokenType. Having setup this as a Login Scenario, this works. We get bothj fields back. Using the template builder, from these Fields we build Variables and Output. Now, calling the Matching Scenario, we need to use both fieldvalues in the Header of the search-call. The header should look like: <Value Key="Authorization" If="" Passes="0" Type="String">xxxxx yyyyyyyyyyyyyy</Value> where xxxxx is the TokenType, and yyyyyyyyyyyyy is the AccessToken. Question: how do we pass the output from the login scenario to the Matching Scenario? What would be the correct syntax in the String-Value? Many thanks for your Advise.
 
Hello,

Assuming that you have generated the outputs in the login scenario as AccessToken and TokenType, then you should use:
<Value Key="Authorization" Type="String">[TokenType] [AccessToken]</Value>
 
Another option you have to avoid adding this header in all your requests, is that your login scenario generates the HeaderName and HeaderValue outputs. You can check the HubSpot template for example for a reference.
XML:
      <Outputs AllowEmpty="false">
        <Output Type="HeaderName" Value="Authorization" />
        <Output Type="HeaderValue" Value="[TokenType] [AccessToken]" />
      </Outputs>

This way the Authorization header will be automatically included in every request.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,322
Messages
591,886
Members
165,469
Latest member
footandankle.my3fcx.us