<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Connector - Custom Auth issue in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4501#M2006</link>
    <description>&lt;P&gt;Hey Ben,&lt;BR /&gt;&lt;BR /&gt;You've made great progress on your first custom connector!&lt;BR /&gt;Before getting into potential fixes, I wanted to propose the following changes based on best practices:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"string" is not a valid &lt;A href="https://docs.workato.com/developing-connectors/sdk/sdk-reference/schema.html#control-types" target="_self"&gt;control type&lt;/A&gt;&amp;nbsp;for connection fields, so please remove lines 9 and 16. FYI, if you don't include a&lt;STRONG&gt; type&amp;nbsp;&lt;/STRONG&gt;attribute, the SDK will treat the connection field as "string" type by default&lt;/LI&gt;&lt;LI&gt;change the value for the&amp;nbsp;&lt;STRONG&gt;url&lt;/STRONG&gt; attribute in line 23 to&amp;nbsp;".api.com"&lt;/LI&gt;&lt;LI&gt;for the &lt;STRONG&gt;base_uri&amp;nbsp;&lt;/STRONG&gt;block, change line 29 to: "https://#{connection['domain']}.api.com"&lt;/LI&gt;&lt;LI&gt;remove&lt;STRONG&gt; auth_uri&lt;/STRONG&gt; block (lines 31-33)&lt;/LI&gt;&lt;LI&gt;remove &lt;STRONG&gt;authorization_url&lt;/STRONG&gt; code (lines 38-40)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Now, I believe the reason for your error is in the &lt;STRONG&gt;apply&lt;/STRONG&gt; block. Because you configured a custom hash in the &lt;STRONG&gt;acquire&lt;/STRONG&gt; block (lines 52-63), you would need to reference the "accessToken" and "refreshToken" fields&amp;nbsp;in the &lt;STRONG&gt;apply&lt;/STRONG&gt; block as&amp;nbsp;&lt;STRONG&gt;connection[:auth_token]['accessToken']&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;connection&lt;/STRONG&gt;&lt;STRONG&gt;[:auth_token]['refreshToken']&lt;/STRONG&gt;, respectively.&amp;nbsp; And FYI, "connection" should be the only argument used in the &lt;STRONG&gt;apply&lt;/STRONG&gt; block in this example.&lt;BR /&gt;&lt;BR /&gt;Now, adding more best practices to the above, I recommend changing the &lt;STRONG&gt;authorization&lt;/STRONG&gt; block to:&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;authorization: {&lt;BR /&gt;  type: "custom_auth",&lt;BR /&gt;&lt;BR /&gt;  acquire: lambda do |connection|&lt;BR /&gt;    #declare variables for API Hash and Timestamp&lt;BR /&gt;    timestamp = now.in_time_zone('Etc/UTC').strftime('%Y-%m-%dT%H:%M:%S.%L')+"Z",&lt;BR /&gt;    hash = [connection['api_key'],timestamp,connection['api_secret']].join("/").md5_hexdigest&lt;BR /&gt;    url = "https://#{connection['domain']}.api.com"&lt;BR /&gt;&lt;BR /&gt;    response = post(url).&lt;BR /&gt;      #no need for 'Accept' header when dealing with 'application/json' content types. Workato includes this by default&lt;BR /&gt;      payload(&lt;BR /&gt;        mode: "key",&lt;BR /&gt;        apiKey: connection['api_key'],&lt;BR /&gt;        apiHash: hash,&lt;BR /&gt;        apiTimestamp: timestamp&lt;BR /&gt;      )&lt;BR /&gt;&lt;BR /&gt;    #generate simpler credentials hash&lt;BR /&gt;    {&lt;BR /&gt;      access_token: response['&lt;SPAN&gt;accessToken&lt;/SPAN&gt;'],&lt;BR /&gt;      refresh_token: response['&lt;SPAN&gt;refreshToken&lt;/SPAN&gt;']&lt;BR /&gt;    }&lt;BR /&gt;  end,&lt;BR /&gt;  &lt;BR /&gt;  refresh_on: [401],&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;  apply: lambda do |connection|&lt;BR /&gt;    #use 'case_sensitive_headers' method to make sure 'x-fv-sessionid' header is treated correctly&lt;BR /&gt;    case_sensitive_headers(&lt;BR /&gt;      'Authorization': connection['access_token'],&lt;BR /&gt;      'x-fv-sessionid': connection['refresh_token']     &lt;BR /&gt;      #no need for 'Content-Type' header when dealing with 'application/json' content types. Workato sets this by default&lt;BR /&gt;    )&lt;BR /&gt;  end &lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2023 17:43:41 GMT</pubDate>
    <dc:creator>sergio-mier</dc:creator>
    <dc:date>2023-05-19T17:43:41Z</dc:date>
    <item>
      <title>Custom Connector - Custom Auth issue</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4497#M2003</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm building my first custom connector and I'm stuck on the auth path.&amp;nbsp;&lt;BR /&gt;each request to the connected application requires an active Session Id &amp;amp; Auth Token to be included in the headers.&amp;nbsp;&lt;BR /&gt;to generate the Session and Auth Tokens I need post a body containing the API Key, Timestamp and a Hash&amp;nbsp;&lt;BR /&gt;The connection flow is this:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;User enters an API Key and API Secret in the connection &amp;gt; fields:&amp;nbsp; block&lt;/LI&gt;&lt;LI&gt;In the acquire: block, the API Key,Timestamp and Secret are joined and encrypted using the .md5_hexdigest method&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;the api returns an accessToken and refreshToken in the response body&lt;/LI&gt;&lt;LI&gt;The accessToken and refreshToken are then included in API request as Authorization &amp;amp; x-fv-sessionid headers respectively: Note the refreshToken expires after 24hrs&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I'm heading in the right direction, but I'm stumped on&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;how to map the acquire: block response body&amp;nbsp; hashes to the apply: block headers&lt;/LI&gt;&lt;LI&gt;my current error&amp;nbsp;"&lt;SPAN&gt;undefined method `[]' for nil:NilClass at line: 72 called from: 84" when testing the connection.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;this is the full connection code.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kerplunk_0-1684504010184.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/414i1A79EFB2CB22BAE4/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Kerplunk_0-1684504010184.png" alt="Kerplunk_0-1684504010184.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the highlights are:&lt;BR /&gt;&lt;BR /&gt;Authorization: block&lt;/P&gt;&lt;PRE&gt;authorization: {&lt;BR /&gt;type: "custom_auth",&lt;BR /&gt;&lt;BR /&gt;#compile Auth URL&lt;BR /&gt;authorization_url: lambda do |connection|&lt;BR /&gt;     ["#{connection['base_uri']}"&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;#{&lt;/SPAN&gt;&lt;SPAN&gt;connection&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'auth_uri'&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;join&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;BR /&gt;&lt;/SPAN&gt;end, &lt;/PRE&gt;&lt;PRE&gt;#Request Session Token&lt;BR /&gt;&lt;BR /&gt;47   acquire: lambda do |connection|&lt;BR /&gt;48     #declare variables for API Hash and Timestamp&lt;BR /&gt;49     timestamp = now.in_time_zone('Etc/UTC').strftime('%Y-%m-%dT%H:%M:%S.%L')+"Z",&lt;BR /&gt;50     hash = ["#{connection['api_key']}","#{timestamp}","#{connection['api_secret']}"].join("/").md5_hexdigest&lt;BR /&gt;51     &lt;BR /&gt;52 {&lt;BR /&gt;53     #initiate request for session and refresh tokens&lt;BR /&gt;54     auth_token: post("#{connection['base_uri']}/session").&lt;BR /&gt;55          headers(Accept: "application/json").&lt;BR /&gt;56          payload(&lt;BR /&gt;57                  mode: "key",&lt;BR /&gt;58                  apiKey: "#{connection['api_key']}",&lt;BR /&gt;59                  apiHash: "#{hash}",&lt;BR /&gt;60                  apiTimestamp: "#{timestamp}"&lt;BR /&gt;61                 )&lt;BR /&gt;62      }&lt;BR /&gt;63      end,&lt;BR /&gt;64      refresh_on: [401],&lt;/PRE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this request should result in the following response from the API&lt;BR /&gt;&lt;BR /&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;"accessToken"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"*********"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;"refreshToken"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"*********"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;"refreshTokenExpiry"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;1684585412066&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;"refreshTokenTtl"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"24 hours"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;"userId"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"****"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;"orgId"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"****"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;I then have the apply block.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;70    apply: lambda do |connection, auth_token|&lt;BR /&gt;71        headers(&lt;BR /&gt;72                'Authorization': "Bearer #{auth_token['accessToken']}",&lt;BR /&gt;73                'x-fv-sessionid': "#{auth_token['refreshToken']}",&lt;BR /&gt;74                'Content-Type': "application/json"&lt;BR /&gt;75               )&lt;BR /&gt;76    end &lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;And finally the test block.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;82    test: lambda do |connection|&lt;BR /&gt;83      get("/core/projects")&lt;BR /&gt;84    end, &lt;/PRE&gt;&lt;P&gt;Any assistance would be much appreciated&lt;BR /&gt;&lt;BR /&gt;Ben&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 13:49:39 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4497#M2003</guid>
      <dc:creator>Kerplunk</dc:creator>
      <dc:date>2023-05-19T13:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Connector - Custom Auth issue</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4501#M2006</link>
      <description>&lt;P&gt;Hey Ben,&lt;BR /&gt;&lt;BR /&gt;You've made great progress on your first custom connector!&lt;BR /&gt;Before getting into potential fixes, I wanted to propose the following changes based on best practices:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"string" is not a valid &lt;A href="https://docs.workato.com/developing-connectors/sdk/sdk-reference/schema.html#control-types" target="_self"&gt;control type&lt;/A&gt;&amp;nbsp;for connection fields, so please remove lines 9 and 16. FYI, if you don't include a&lt;STRONG&gt; type&amp;nbsp;&lt;/STRONG&gt;attribute, the SDK will treat the connection field as "string" type by default&lt;/LI&gt;&lt;LI&gt;change the value for the&amp;nbsp;&lt;STRONG&gt;url&lt;/STRONG&gt; attribute in line 23 to&amp;nbsp;".api.com"&lt;/LI&gt;&lt;LI&gt;for the &lt;STRONG&gt;base_uri&amp;nbsp;&lt;/STRONG&gt;block, change line 29 to: "https://#{connection['domain']}.api.com"&lt;/LI&gt;&lt;LI&gt;remove&lt;STRONG&gt; auth_uri&lt;/STRONG&gt; block (lines 31-33)&lt;/LI&gt;&lt;LI&gt;remove &lt;STRONG&gt;authorization_url&lt;/STRONG&gt; code (lines 38-40)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Now, I believe the reason for your error is in the &lt;STRONG&gt;apply&lt;/STRONG&gt; block. Because you configured a custom hash in the &lt;STRONG&gt;acquire&lt;/STRONG&gt; block (lines 52-63), you would need to reference the "accessToken" and "refreshToken" fields&amp;nbsp;in the &lt;STRONG&gt;apply&lt;/STRONG&gt; block as&amp;nbsp;&lt;STRONG&gt;connection[:auth_token]['accessToken']&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;connection&lt;/STRONG&gt;&lt;STRONG&gt;[:auth_token]['refreshToken']&lt;/STRONG&gt;, respectively.&amp;nbsp; And FYI, "connection" should be the only argument used in the &lt;STRONG&gt;apply&lt;/STRONG&gt; block in this example.&lt;BR /&gt;&lt;BR /&gt;Now, adding more best practices to the above, I recommend changing the &lt;STRONG&gt;authorization&lt;/STRONG&gt; block to:&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;authorization: {&lt;BR /&gt;  type: "custom_auth",&lt;BR /&gt;&lt;BR /&gt;  acquire: lambda do |connection|&lt;BR /&gt;    #declare variables for API Hash and Timestamp&lt;BR /&gt;    timestamp = now.in_time_zone('Etc/UTC').strftime('%Y-%m-%dT%H:%M:%S.%L')+"Z",&lt;BR /&gt;    hash = [connection['api_key'],timestamp,connection['api_secret']].join("/").md5_hexdigest&lt;BR /&gt;    url = "https://#{connection['domain']}.api.com"&lt;BR /&gt;&lt;BR /&gt;    response = post(url).&lt;BR /&gt;      #no need for 'Accept' header when dealing with 'application/json' content types. Workato includes this by default&lt;BR /&gt;      payload(&lt;BR /&gt;        mode: "key",&lt;BR /&gt;        apiKey: connection['api_key'],&lt;BR /&gt;        apiHash: hash,&lt;BR /&gt;        apiTimestamp: timestamp&lt;BR /&gt;      )&lt;BR /&gt;&lt;BR /&gt;    #generate simpler credentials hash&lt;BR /&gt;    {&lt;BR /&gt;      access_token: response['&lt;SPAN&gt;accessToken&lt;/SPAN&gt;'],&lt;BR /&gt;      refresh_token: response['&lt;SPAN&gt;refreshToken&lt;/SPAN&gt;']&lt;BR /&gt;    }&lt;BR /&gt;  end,&lt;BR /&gt;  &lt;BR /&gt;  refresh_on: [401],&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;  apply: lambda do |connection|&lt;BR /&gt;    #use 'case_sensitive_headers' method to make sure 'x-fv-sessionid' header is treated correctly&lt;BR /&gt;    case_sensitive_headers(&lt;BR /&gt;      'Authorization': connection['access_token'],&lt;BR /&gt;      'x-fv-sessionid': connection['refresh_token']     &lt;BR /&gt;      #no need for 'Content-Type' header when dealing with 'application/json' content types. Workato sets this by default&lt;BR /&gt;    )&lt;BR /&gt;  end &lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 17:43:41 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4501#M2006</guid>
      <dc:creator>sergio-mier</dc:creator>
      <dc:date>2023-05-19T17:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Connector - Custom Auth issue</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4502#M2007</link>
      <description>&lt;P&gt;Wow&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/8538"&gt;@sergio-mier&lt;/a&gt;,&amp;nbsp;THANK YOU for these insights! Lots of helpful tips here.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/8842"&gt;@Kerplunk&lt;/a&gt;,&amp;nbsp;please let us know if this solves your issue. I'm sure other folks here would love to hear how it goes.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR /&gt;Meghan&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 20:03:03 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4502#M2007</guid>
      <dc:creator>meghan-legaspi</dc:creator>
      <dc:date>2023-05-19T20:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Connector - Custom Auth issue</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4503#M2008</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/8538"&gt;@sergio-mier&lt;/a&gt;&amp;nbsp;thanks so much for the quick response.&amp;nbsp;the good news is that I'm no longer getting the undefined method error, but it's not quite there yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;a couple of points to note:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the base url is &lt;STRONG&gt;[domain].api.filevineapp.com&lt;/STRONG&gt; - api.com didn't work.&lt;/LI&gt;&lt;LI&gt;I was getting a 500 error following the initial test, so updated the &lt;STRONG&gt;refresh_on to include: [401, 500]&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;So after applying the above changes the test step fails as expected, however there is a new error in the acquire request.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;{&lt;BR /&gt;&lt;SPAN class=""&gt;   mode:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;key"&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN class=""&gt;   apiKey:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;*****&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN class=""&gt;   apiHash:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;*****&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN class=""&gt;   apiTimestamp:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;[&lt;BR /&gt;&lt;SPAN class=""&gt;          "2023-05-20T08:19:05.284Z"&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN class=""&gt;          "&lt;FONT color="#FF0000"&gt;a4480e1436c4740099e4388bd6c66745&lt;/FONT&gt;"&lt;/SPAN&gt;&lt;BR /&gt;   ]&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;It's not clear why the apiTimestamp hash is being converted into an array or what that spurious string represents. however at the moment the error is&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;error:&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;Invalid "apiTimestamp"; expected an ISO-formatted date string&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Also just for clarification:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Am I correct in thinking that the sequence of connection functions for the initial connection is test (which fails)&amp;gt; refresh &amp;gt; acquire &amp;gt; test (success)??&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 08:49:13 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4503#M2008</guid>
      <dc:creator>Kerplunk</dc:creator>
      <dc:date>2023-05-22T08:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Connector - Custom Auth issue</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4506#M2009</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/8538"&gt;@sergio-mier&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;I've successfully connected to the API at last... !!!&lt;BR /&gt;to make it work I had to&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;comment out the the timestamp and apiHash variables defined in the acquire block&lt;/LI&gt;&lt;LI&gt;replace the references to the timestamp variable in the apiHash and acquire request payload with the timestamp formula&lt;/LI&gt;&lt;LI&gt;replace the apiHash value with the full apiHash formula&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;nbsp;payload(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;mode: "key",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;apiKey: connection['api_key'],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;apiHash: [connection['api_key'],now.in_time_zone('Etc/UTC').strftime('%Y-%m-%dT%H:%M:%S.%L')+"Z",connection['api_secret']].join("/").md5_hexdigest,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;apiTimestamp: now.in_time_zone('Etc/UTC').strftime('%Y-%m-%dT%H:%M:%S.%L')+"Z"&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Obviously it would be cleaner to reference the variable in the above, so it would be cool if you have any insight as to why that is occurring however I'm happy to have made a successful connection.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 10:23:03 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/custom-connector-custom-auth-issue/m-p/4506#M2009</guid>
      <dc:creator>Kerplunk</dc:creator>
      <dc:date>2023-05-22T10:23:03Z</dc:date>
    </item>
  </channel>
</rss>

