active_campaign icon indicating copy to clipboard operation
active_campaign copied to clipboard

JSON Error

Open jonnygalassip opened this issue 5 years ago • 1 comments

Hi, after gem install, i try connect with method:

client = ::ActiveCampaign::Client.new(
      api_url: cuenta.api_url, # e.g. 'https://youraccount.api-us1.com/api/3'
      api_token: cuenta.api_token) # e.g. 'a4e60a1ba200595d5cc37ede5732545184165e'

and if i want to get list, fail 👎

2.5.1 :002 > client.list_list D, [2020-09-07T18:18:33.896037 #21082] DEBUG -- : HTTPI TLSv1_2/none GET request to subdomain.activehosted.com (net_http) Traceback (most recent call last): 1: from (irb):2 JSON::ParserError (783: unexpected token at '

)
    <div style="font-size:15px; color:#333; padding: 50px; font-family:Arial, Helvetica, sans-serif;">
    <div style="font-size:33px; padding:12px;">Not Found</div>
    <div>Sorry, this page could not be found.<br />

Please check your link/URL and try again.

'

please help me

jonnygalassip avatar Sep 07 '20 21:09 jonnygalassip

The released gem version is for version 1 of their API and you are using version 3 (currently unreleased). You either have to point your gem reference to the master branch or change your API version url.

mhenrixon avatar Sep 10 '20 07:09 mhenrixon