Hello,
I have now created a template however I am returned the below error:
View attachment 19713
The log shows:
Started scenario with empty id
Started Auth
Request text:
https://eu.app.clio.com/oauth/token
Request form value refresh_token set to XXX
Request form value grant_type set to refresh_token
Request form value client_id set to XXX
Request form value client_secret set to XXX
Response text: {"access_token":"XXX","token_type":"bearer","expires_in":2592000}
Response finished
Variable AccessToken set to XXX
Variable ExpiresIn set to 2592000
Finished Auth
Request text:
https://eu.app.clio.com/api/v4/cont...ame,last_name,primary_phone_number,id,company
Response text: {"meta":{"paging":{},"records":1},"data":[{"first_name":"Test","last_name":"2","primary_phone_number":"01462417100","id":2814835,"company":null}]}
Response finished
Finished scenario with empty id
The template is here:
<?xml version="1.0"?>
<Crm xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" Country="US" Name="Clio V4" Version="1">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="2" />
<Parameters>
<Parameter Name="ClientId" Type="String" Parent="General Configuration" Editor="String" Title="Client ID:" />
<Parameter Name="ClientSecret" Type="String" Parent="General Configuration" Editor="String" Title="Client Secret:" />
<Parameter Name="RefreshToken" Type="OAuth" Parent="General Configuration" Editor="String" Title="Refresh Token:" RequestUrl="https://eu.app.clio.com/oauth/authorize" RequestUrlParameters="response_type=code&client_id=[ClientId]&redirect_uri=[RedirectUri]&state=[State]" ResponseScenario="OAuthGetRefreshToken" />
</Parameters>
<Authentication Type="Scenario">
<Value>Auth</Value>
</Authentication>
<Scenarios>
<Scenario Id="Auth" Type="REST">
<Request Url="https://eu.app.clio.com/oauth/token" MessagePasses="0" RequestContentType="application/x-www-form-urlencoded" RequestEncoding="UrlEncoded" RequestType="Post" ResponseType="Json">
<PostValues>
<Value Key="refresh_token" Passes="0" Type="String">[RefreshToken]</Value>
<Value Key="grant_type" Passes="0" Type="String">refresh_token</Value>
<Value Key="client_id" Passes="0" Type="String">[ClientId]</Value>
<Value Key="client_secret" Passes="0" Type="String">[ClientSecret]</Value>
</PostValues>
</Request>
<Rules>
<Rule Type="Any">access_token</Rule>
</Rules>
<Variables>
<Variable Name="AccessToken" Path="access_token">
<Filter />
</Variable>
<Variable Name="ExpiresIn" Path="expires_in">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="HeaderName" Passes="0" Value="Authorization" />
<Output Type="HeaderValue" Passes="0" Value="Bearer [AccessToken]" />
<Output Type="BearerExpiration" Passes="0" Value="[ExpiresIn]" />
</Outputs>
</Scenario>
<Scenario Id="OAuthGetRefreshToken" Type="REST">
<Request Url="https://eu.app.clio.com/oauth/token" MessagePasses="0" RequestContentType="application/x-www-form-urlencoded" RequestEncoding="UrlEncoded" RequestType="Post" ResponseType="Json">
<PostValues>
<Value Key="code" Passes="0" Type="String">
Code:
</Value>
<Value Key="grant_type" Passes="0" Type="String">authorization_code</Value>
<Value Key="client_id" Passes="0" Type="String">[ClientId]</Value>
<Value Key="client_secret" Passes="0" Type="String">[ClientSecret]</Value>
<Value Key="redirect_uri" Passes="0" Type="String">[RedirectUri]</Value>
<Value Key="state" Passes="0" Type="String">[state]</Value>
</PostValues>
</Request>
<Rules>
<Rule Type="Any">refresh_token</Rule>
</Rules>
<Variables>
<Variable Name="Result" Path="refresh_token">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="Result" Passes="0" Value="[Result]" />
</Outputs>
</Scenario>
<Scenario Id="" Type="REST">
<Request Url="https://eu.app.clio.com/api/v4/contacts?query=[Number]&fields=first_name,last_name,primary_phone_number,id,company" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="first_name">
<Filter />
</Variable>
<Variable Name="LastName" Path="last_name">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="primary_phone_number">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[ContactID]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="ContactUrl" Passes="0" Value="https://eu.app.clio.com/nc/#/contacts/[ContactID]" />
</Outputs>
</Scenario>
</Scenarios>
</Crm>
Any ideas?