nateleavitt / infusionsoft Goto Github PK
View Code? Open in Web Editor NEWRuby Gem for the Infusionsoft API
License: MIT License
Ruby Gem for the Infusionsoft API
License: MIT License
I think there is a missing param in the updateEmailTemplate method ...
There appears to be no id to reference which template should be updated.
def email_update_template(id, title, category, from, to, cc, bcc, subject,
text_body, html_body, content_type, merge_context)
response = get('APIEmailService.updateEmailTemplate', title, category, from,
to, cc, bcc, subject, text_body, html_body, content_type, merge_context)
end
Hi!
I'm work with infusionsoft gem.
In development mode, all normal.
But in heroku...
contact_id = Infusionsoft.contact_add({:FirstName => @user.first, :LastName => @user.last, :Email => @user.email, :City => @user.city, :State => @user.state, :Password => @user.password})
returns me a:
NoMethodError (undefined method `split' for nil:NilClass):
Why I have this error?
heroku stack - cedar 1.9.2,
my development mode - 1.9.2-p290 too.
Regards,
Alex
Hello,
This is not necessary an issue of this gem, but I ran out of options of where to ask. When creating a contact on Keap using their API form, we can add an option for them to add a their phone number and opt in to receive text messages. It does not look like we can do that when we are creating using their API. I see that you can do it on the email but not for the phone number. Is there a way to do this?
Thank you
Infusion Email Send no Work.
My code:
Infusionsoft.configure do |config|
config.api_url = url
config.api_key = api
config.api_logger = Logger.new("#{Rails.root}/log/infusionsoft.log")
end
contact_list = [12, 6]
Infusionsoft.email_send(contact_list, "#{newsletter.from_email}", "[email protected]", "", "", "Multipart", title, html, plain)
cat infusionsoft.log
INFO -- : CALL: APIEmailService.sendEmail api_url: xxx.infusionsoft.com api_key:xxxxx at:2015-09-28 13:38:09 -0500 args:[[12, 6], "[email protected]", "[email protected]", "", "", "Multipart", "this subject", "This HTML", "This Plain"]
INFO -- : RESULT: false
Is it possible to apply tags programatically to contact?
I've looked through this library and I found Infusionsoft.contact_add_to_group
method.
But I am not sure how to get group_id
or Is there any easy way to assign tags with strings array?
Or How can I retrieve group id from tag string?
Infusionsoft.contact_add_to_group(contact_id, group_id)
Please help!
Thanks.
Hello,
Is there a way to get all Contacts without specific cretaria ?
Many thanks
Hello @nateleavitt I am having an issue retrieving a contact.
If I run:
Infusionsoft.contact_load('327950')
I get:
InfusionAPIError: No method matching arguments: java.lang.String, java.lang.Integer, [Ljava.lang.Object;, java.util.HashMap
from /Users/eduardo.souza/.rvm/gems/ruby-2.6.1@btv/gems/infusionsoft-1.3.6/lib/infusionsoft/exception_handler.rb:28:in initialize' Caused by XMLRPC::FaultException: No method matching arguments: java.lang.String, java.lang.Integer, [Ljava.lang.Object;, java.util.HashMap from /Users/eduardo.souza/.rvm/gems/ruby-2.6.1@btv/gems/xmlrpc-0.3.2/lib/xmlrpc/client.rb:272:in
call'
If I run:
Infusionsoft.contact_load('327950', ['FirstName', 'LastName'])
I get:
ArgumentError: wrong number of arguments (given 3, expected 2)
from /Users/eduardo.souza/.rvm/gems/ruby-2.6.1@btv/gems/infusionsoft-1.3.6/lib/infusionsoft/client/contact.rb:69:in `contact_load'
I have tried as an array, as strings and still nothing works.
What am I doing wrong here?
PS.: I was able to successfully add a contact.
Hi,
All of a sudden we seem to be getting an error when trying to use this method. The error is: #<RuntimeError: Wrong type NilClass. Not allowed!>
We pass in a hash of {:FirstName => "x", LastName: "y", :Email => z}
with the second parameter being "Email"
. We haven;t had an issue doing this until recently. Any ideas?
[2013-09-30 23:39:47] INFO Rails : CALL: DataService.query api_key:XXXXXXXXXXXXXX at:2013-09-30 23:39:47 -0500 args:["ProductCategory", 1000, 0, {}, ["CategoryImage"]]
[2013-09-30 23:39:48] ERROR Rails : ERROR: undefined method `split' for nil:NilClass
Referencing this topic:
https://community.infusionsoft.com/t/intermittent-sll-connection-errors/31785/13
And issue #70 , This gem could benefit from a rescue/retry on API calls. From the forum topic:
def call(*args)
result, retries = nil, 0
begin
silence_stream(STDERR) do
result = xmlrpc.call *args
end
rescue OpenSSL::SSL::SSLError => e
# According to IFS devs this is a timeout in the SSL handshake between us and them
# So we should be able to retry this without ill effects
if e.message =~ /SSL_connect SYSCALL/
retries += 1
if retries > 3
log "*** INFUSION SSL ERROR: Handshake timeout (max retries reached) *** #{e.message}"
raise e
else
log "*** INFUSION SSL ERROR: Handshake timeout (retry #{retries} of 3) *** #{e.message}"
retry
end
else
raise e
end
end
result
end
I had been making my own rescue blocks on every single API call but that's just wayy too much code smell:
begin
Infusionsoft.contact_add_to_group(foo, bar)
rescue OpenSSL::SSL::SSLError, Net::HTTPBadGateway => e
puts "Infusionsoft error."
puts e.message
puts "Retrying in 5 seconds..."
sleep(5)
retry
end
end
Where is the method which allows to add credit_card to user?
There is an issue with InvoiceService.getinvoice_id
API call in infusionsoft/lib/infusionsoft/client/invoice.rb
line number 300. Its actually InvoiceService.getInvoiceId
Please refer this PR - #69
Hi Nate, thanks for your help with this gem and the Infusionsoft system.
Here's the thing, basically, our developer is using the gem to create an Invoice, charge that Invoice, and THEN setup a Subscription, which is then set to be billed 30 days later.
Wouldn't it be easier just to setup the Subscription and charge it immediately? How does CustomerHub work it?
My developer says there is no way to setup a Subscription and charge right away. He says that Infusionsoft runs those charges every few hours, so there is no way for us to know whether a charge was successful or not.
Do you have some thoughts or suggestions on this? My developer is from India and has been a bit confused by Infusionsoft. If you could help me out and suggest the proper way we should be doing this, it would be greatly appreciated.
Thanks,
Michael
(415) 797-2470
So I need to get the tags a contact has been assigned, and seems like Infusionsoft call these groups, however I can't get the names of the tags, this is what I'm doing:
Infusionsoft.data_load 'Contact', 1017, [:groups]
#=> {"groups"=>"103"}
Searching for groups will only give me the id not the actual tag name, and given that Infusionsoft generates this upon creation the id itself won't tell my app anything about this contact, so I did some digging and found that Infusion soft has another table ContactGroupAssign
were they keep the tag information so I tried that using the DataService.load
and this is what happens:
Infusionsoft.data_load 'ContactGroupAssign', 103, [ :GroupId ]
=begin
Infusionsoft::NoFieldFoundError: [NoFieldFound]No field found: ContactGroupAssign.Id
from /Users/enrique/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/infusionsoft-1.1.8/lib/infusionsoft/exception_handler.rb:26:in `initialize'
=end
Infusionsoft breaks away from convention here, by naming it's primary key to GroupId
instead and the gem seems to default to Id
which is causing an error of NoFieldFound
, maybe there is a way in this gem to bypass this but so far I couldn't find any, is this a bug or am I overlooking something? I attached the list of column names in the ContactGroupAssign
table from infusionsoft docs.
http://developers.infusionsoft.com/dbDocs/ContactGroupAssign.html
Thanks in advance
I am trying to add a contact to a group using contact_add_to_group
, that's when i receive this error.
I noticed that this only happens with contacts that are already existing and not with contacts that were created prior to calling this function.
Thoughts on how I might troubleshoot this? I'm running Ruby 2.3.1 and Rails 5.0.2.
I have access to all the other methods, data_query, data_find_by_field, invoice_create_blank_order, etc.
Infusionsoft::UnexpectedError: [Unexpected]Unexpected error creating subscription
from /Users/travis/.rvm/gems/ruby-2.3.1/gems/infusionsoft-1.1.9/lib/infusionsoft/exception_handler.rb:26:in `initialize'
from /Users/travis/.rvm/gems/ruby-2.3.1/gems/infusionsoft-1.1.9/lib/infusionsoft/connection.rb:25:in `new'
from /Users/travis/.rvm/gems/ruby-2.3.1/gems/infusionsoft-1.1.9/lib/infusionsoft/connection.rb:25:in `rescue in connection'
from /Users/travis/.rvm/gems/ruby-2.3.1/gems/infusionsoft-1.1.9/lib/infusionsoft/connection.rb:16:in `connection'
from /Users/travis/.rvm/gems/ruby-2.3.1/gems/infusionsoft-1.1.9/lib/infusionsoft/request.rb:30:in `request'
from /Users/travis/.rvm/gems/ruby-2.3.1/gems/infusionsoft-1.1.9/lib/infusionsoft/request.rb:6:in `get'
from /Users/travis/.rvm/gems/ruby-2.3.1/gems/infusionsoft-1.1.9/lib/infusionsoft/client/invoice.rb:75:in `invoice_add_recurring_order'
from /Users/travis/.rvm/gems/ruby-2.3.1/gems/infusionsoft-1.1.9/lib/infusionsoft.rb:19:in `method_missing'
Hi, I've been working with this gem for the past few days and it's been really great so far. I'm running into an odd problem attempting to add a contact to a campaign through the gem.
> Infusionsoft.contact_add_to_campaign(5555, 5)
=> nil
I'd looked at the documentation and was expecting true or false depending on if the campaign adding was a success or not, but no matter what I do with this function I get nil.
Any thoughts as to what this could be?
Hey there,
I was wondering - is it possible to have multiple instances of the Wrapper at the same time? In a way, that i can pass in the required API Keys when i create a new Infusionsoft object?
We have an issue when we try to update a contact's custom datetime field when using ContactService.addWithDupCheck.
I opened a ticket with Infusionsoft as I believe it may be an issue on their end, yet I also just wanted to double check this scenario here.
ContactService.addWithDupCheck works on first attempt to create a new contact record. Yet, on a second call or more, with an existing contact, the custom datetime fields fail to update. Our normal use case is we have a variety of custom fields (first name, last name, datetime, etc) that get updated in a single bulk update. All fields will update properly except the datetime fields.
A workaround I figured out is to do a separate update call for that contact record using ContactService.update.
Another issue I encountered is being able to clear a field that is no longer needed. It seems the Infusionsoft API rejects our data if certain keys are present, but have no value. Yet, I found that using the string zero "0" allows us to clear out the field.
For example, currently we have two custom datetimes (ex: day 1, day 2) for each contact record. For one scenario, we create the record and set the two custom datetimes which work. Then, on an update call, if we need to update day 1 datetime and clear/reset day 2, there was an issue using an empty string "" and nil as a value. Setting day 2 to "0" seemed to work and the reset the field to default (and day 1 would update as well).
Is there a known issue or note using addWithDupCheck in a bulk update?
Is using string zero "0" a valid way of resetting a value for a field?
On my current project (using Ruby 2.3.x, and version 1.1.9 of this gem), I receive the following error when trying to pull down an email template with Infusionsoft.get_email_template(id)
:
REXML::UndefinedNamespaceException: Undefined prefix ex found
By dumping the raw HTML response, it appears that Infusionsoft is inserting the tag <ex:nil/>
in its email template responses, which REXML dislikes.
If I patch XMLRPC::Client#call2 to strip that substring, then I can successfully fetch email templates. But, patching a core class strikes me as a hacky solution.
Are there any other ways to work around this issue? I'll attach a stack trace in a comment.
Is it possible to search for a contact or any other table by custom fields? My company has "Retail ID" that is in every contact custom fields, and is unique for each one. I can't figure out how to search for contacts by that specific field. I was hoping there would be a way to link those tables. Am I missing something?
I noticed in my testing that the api_key and api_url are printed in plain text in the log with each call. Not sure if this is intended or not. Seems like I'd prefer that not be in the log files. Just a thought.
Infusionsoft.invoice_charge_invoice(14, "Payment", 1, 1, 0) raising this error :
ERROR: No method matching arguments: java.lang.String, java.lang.Integer, java.lang.String, java.lang.Integer, java.lang.Integer, java.lang.Integer
InfusionAPIError: No method matching arguments: java.lang.String, java.lang.Integer, java.lang.String, java.lang.Integer, java.lang.Integer, java.lang.Integer
from /home/mcd/.rvm/gems/ruby-2.4.1/gems/infusionsoft-1.2.1/lib/infusionsoft/exception_handler.rb:28:in `initialize'
What is wrong with these arguments and what is merchange_id and bypass_commissions in
Infusionsoft.invoice_charge_invoice(invoice_id, notes, credit_card_id, merchange_id, bypass_commissions)
With the introduction of OAuth2 and REST support, it would be nice to see an example of:
It would make sense to have the strings that are passed to the API in constants. For example, in contact_add_with_dup_check
, you need to pass either Email
, EmailAndName
, or EmailAndNameAndCompany
. It would be nice if you could use Infusionsoft::CHECK_TYPE_EMAIL
. Thoughts? If this sounds like a good idea, I'd be happy to create a pull-request.
Looking for some clarification. According to the Infusionsoft documentation here https://developer.infusionsoft.com/docs/read/Getting_Started_With_OAuth2. It doesn't appear this gem conforms to the documentation's OAuth usage/requirement. Is that correct?
Implement InvoiceService.addManualPayment
Hi @nateleavitt i am integrating this gem in my rails app and i am facing the same issue with some of the methods. Like when i try to make an api call to add contac to campaign
contact_id = Infusionsoft.contact_add_with_dup_check({ FirstName:'Bill', LastName:'Joe', Email:'[email protected]' }, 'ContactName')
Infusionsoft.contact_add_to_campaign(contact_id,2)
This throws an error
<Infusionsoft::LoadingError: [Loading]Error loading follow-up sequence>
Any update on this ?
Tried running 1.1.5, 1.1.6 and master... and I keep getting the below api_logger error.
Initializer is set up exactly as in the example. Am I missing something?
NameError: undefined local variable or method `api_logger' for #<InfusionAPIError: InfusionAPIError>
from /Users/Walsh/.rvm/gems/ruby-2.0.0-p0@itglue/gems/infusionsoft-1.1.5/lib/infusionsoft/connection.rb:48:in `initialize'
from /Users/Walsh/.rvm/gems/ruby-2.0.0-p0@itglue/gems/infusionsoft-1.1.5/lib/infusionsoft/connection.rb:23:in `new'
from /Users/Walsh/.rvm/gems/ruby-2.0.0-p0@itglue/gems/infusionsoft-1.1.5/lib/infusionsoft/connection.rb:23:in `rescue in connection'
from /Users/Walsh/.rvm/gems/ruby-2.0.0-p0@itglue/gems/infusionsoft-1.1.5/lib/infusionsoft/connection.rb:14:in `connection'
from /Users/Walsh/.rvm/gems/ruby-2.0.0-p0@itglue/gems/infusionsoft-1.1.5/lib/infusionsoft/request.rb:29:in `request'
from /Users/Walsh/.rvm/gems/ruby-2.0.0-p0@itglue/gems/infusionsoft-1.1.5/lib/infusionsoft/request.rb:5:in `get'
from /Users/Walsh/.rvm/gems/ruby-2.0.0-p0@itglue/gems/infusionsoft-1.1.5/lib/infusionsoft/client/data.rb:24:in `data_load'
from /Users/Walsh/.rvm/gems/ruby-2.0.0-p0@itglue/gems/infusionsoft-1.1.5/lib/infusionsoft.rb:19:in `method_missing'
from (irb):1
I can add a new contact, but cannot seem to add a contact to a campaign.
Example:
contact_id = Infusionsoft.contact_add_with_dup_check({ FirstName:'Hank', LastName:'Hill', Email:'[email protected]' }, 'EmailAndName')
Infusionsoft.contact_add_to_campaign(contact_id, 35) //This throws the error.
Thoughts?
We can add any contact easily however there is no option to OptIn so that we can start any promotion.
When i added gem 'infusionsoft'
I get
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.1.3)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
The method invoice_add_recurring_order doesn't seem to work in the master branch due to the fact that not all the parameters that are listed as required under the Infusionsoft API docs are present in this method.
The missing parameters are: "qty", "price", "allowTax".
My assumption may be off, but either this method doesn't work correctly (because the required params are missing) or those three items aren't actually required parameters. Not sure if anyone else uses the method as is and without issue.
Regardless, I have been using a modified method to support all of the required parameters and the transactions are properly submitted via the api. When I revert back to using the master branch (nateleavitt/infusionsoft), the transactions fail.
This may be due to the fact that my application allows for variable pricing in the recurring order.
Question: would this be a case where the method could be modified to fully support the API docs, or would it be better to add a second method like, invoice_add_custom_recurring_order ... to avoid breaking some application that is currently using it successfully as is?
I'm new to infusionsoft and looking to use it in my application to save contacts. I'm not able to get app_url after registering an app on infusionsoft as i think they stop supporting old way and only way to use it through oauth2.
Can i use this gem to connect with the API now? Please help me how to use it with the api latest version.
Hi everyone,
I'm new here on infusionsoft, I followed the instruction correctly, I provide correct configuration
API URL & API Key.. but I'm having an error saying:
*** INFUSION API ERROR: retrying 1 ***
*** INFUSION API ERROR: retrying 2 ***
*** INFUSION API ERROR: retrying 3 ***
*** INFUSION API ERROR: retrying 4 ***
*** INFUSION API ERROR: retrying 5 ***
And I view the the xml file It said, "
faultCode
0
faultString
Failed to parse XML-RPC request: Premature end of file.
"
Can anyone help me? Thanks in advance
I have installed using 'bundle install' after adding gem 'infusionsoft' in my Gemfile. I have also, as instructed, created config/initializers/infusionsoft.rb and added the URL and api key configuration as shown (using my specific details). Now, every command I run with rails (e.g., 'rails generate migration AddXyzModel') bombs out with:
$ rails generate migration AddContentManagement
/usr/local/lib/ruby/gems/1.9.1/gems/infusionsoft-1.0.4/lib/infusionsoft/client.rb:25:in <class:Client>': uninitialized constant Infusionsoft::Client::Search (NameError) from /usr/local/lib/ruby/gems/1.9.1/gems/infusionsoft-1.0.4/lib/infusionsoft/client.rb:5:in
module:Infusionsoft'
from /usr/local/lib/ruby/gems/1.9.1/gems/infusionsoft-1.0.4/lib/infusionsoft/client.rb:1:in <top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/infusionsoft-1.0.4/lib/infusionsoft.rb:2:in
<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in require' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in
block (2 levels) in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in
block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in
require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler.rb:120:in require' from /home/ellel/projects/ellel/apps/web/rails/ellel-cloud/config/application.rb:7:in
<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:21:in require' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:21:in
<top (required)>'
from script/rails:6:in require' from script/rails:6:in
This is running Rails 3.1.1.
I put
gem 'infusionsoft'
in my gemfile.
I added my API Key and URL as environmental variables that get loaded into an initializer like so:
Infusionsoft.configure do |config|
config.api_url = ENV['INFUSIONSOFT_URL'] # example infused.infusionsoft.com
config.api_key = ENV['INFUSIONSOFT_API_KEY']
config.api_logger = Logger.new("#{Rails.root}/log/infusionsoft_api.log") # optional logger file
end
But when I test the contact add service in my rails console I get this error:
SocketError: getaddrinfo: nodename nor servname provided, or not known
from /Users/Justus/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/http.rb:879:in `initialize'
Is anyone aware of a fix for this?
Thanks for your work on this gem. It's SO much nicer than dealing with the api directly.
I'm running into a simple issue in that I can't seem to figure out how to get the contact_id which comes in the response after adding a new contact using contact_add.
I see that it's going into the log, but I can't seem to find out how to save it to a variable for use in future calls pertaining to that contact.
Thanks in advance. I'm sure I'm just missing something simple.
When a request to the Infusionsoft API returns something other than a 200 response, we aren't able to determine the reason for the error as the response code/body isn't being logged:
In another non-Rails application we maintain, we log the failing Infusionsoft API response code/body as those can be helpful. I.e. 401 Unauthorized when a token is invalid, or seeing a 404 if we try to update a non-existent contact, or a 500 error if it's an issue on Infusionsoft's side (which we've encountered before).
Even something as simple as logging the err
object would go a long way in helping us when it comes to troubleshooting issues with the Infusionsoft API. E.g.:
# https://github.com/nateleavitt/infusionsoft/blob/master/lib/infusionsoft/request.rb#L51
resp = RestClient::Request.execute(opts)
rescue RestClient::ExceptionWithResponse => err
api_logger.info "RESPONSE: #{err.inspect}"
else
I can create a PR for this if you'd like.
I'm getting some interesting errors occasionally when sending simple commands, like removing contacts from a group:
OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=unknown state
/home/testbed/.rvm/gems/ruby-2.4.1@global/gems/xmlrpc-0.2.1/lib/xmlrpc/client.rb:495:in `do_rpc'
/home/testbed/.rvm/gems/ruby-2.4.1@global/gems/xmlrpc-0.2.1/lib/xmlrpc/client.rb:287:in `call2'
/home/testbed/.rvm/gems/ruby-2.4.1@global/gems/xmlrpc-0.2.1/lib/xmlrpc/client.rb:268:in `call'
/home/testbed/.rvm/gems/ruby-2.4.1/gems/infusionsoft-1.2.0/lib/infusionsoft/connection.rb:18:in `connection'
/home/testbed/.rvm/gems/ruby-2.4.1/gems/infusionsoft-1.2.0/lib/infusionsoft/request.rb:30:in `request'
/home/testbed/.rvm/gems/ruby-2.4.1/gems/infusionsoft-1.2.0/lib/infusionsoft/request.rb:6:in `get'
/home/testbed/.rvm/gems/ruby-2.4.1/gems/infusionsoft-1.2.0/lib/infusionsoft/client/contact.rb:134:in `contact_remove_from_group'
/home/testbed/.rvm/gems/ruby-2.4.1/gems/infusionsoft-1.2.0/lib/infusionsoft.rb:19:in `method_missing'
In the meantime I'm having to catch this error in a rescue block, to try again after a certain number of seconds. The gem seems unaware that this situation can happen.
I'm using REST API
And looking for the simple authorization way
namespace :token do
desc 'generate access token'
task :generate_access_token do
require 'faraday'
require 'uri'
data = {
application: ENV['INFUSIONSOFT_DEV_API_URL'],
scope: 'full',
client_id: ENV['INFUSIONSOFT_DEV_CLIENT_ID'],
client_secret: ENV['INFUSIONSOFT_DEV_CLIENT_SECRET'],
}
authorization_string = "#{ENV['INFUSIONSOFT_DEV_CLIENT_ID']}:#{ENV['INFUSIONSOFT_DEV_CLIENT_SECRET']}"
url = "https://accounts.infusionsoft.com/app/oauth/userToken"
response = Faraday.post(url) do |req|
req.headers['Authorization'] = "Basic #{Base64.strict_encode64(authorization_string)}"
req.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
req.body = URI.encode_www_form(data)
end
response_body = JSON.parse(response.body)
...
end
end
It works in case I add Cookie to reqest Header
req.headers['Cookie'] = "SESSION=YWU3ZjExMDgtNjliNS00ZGEyLWFmMmEtMWU5ODEwODM4ODFi"
But its inconvenient
Is there the simple way to using your library without Authorization to proceed REST API implementation?
My contacts shouldn't Authorize I just need to apply the tags actions to my contacts that using my App and already Authorized there
Please advise
Is there a way to pull a contact's id from infusionsoft if I have the contact email in my database?
I'm new to rails so your patience with my rookie question is appreciated!
I've installed the gem successfully.
I created the infusionsoft configuration file.
But... where do I put this api call?
Infusionsoft.contact_add({:FirstName => 'first_name', :LastName => 'last_name', :Email => '[email protected]'})
Also does 'first_name', 'name' refer to database field names within infusionsoft?
Also do I replace '[email protected]' with the infusionsoft email field name?
Thanks for your help!
I need to research the additions that would be helpful for anyone implementing the new OAuth 2 flow.
Sorry, but I couldn't find a way to edit the documentation so I'm submitting this as an issue. It's a quick fix.
http://rdoc.info/github/nateleavitt/infusionsoft/Infusionsoft/Client/Invoice:invoice_charge_invoice
the first key in invoice_charge_invoice is "Successful". In the documentation it's missing, it's:
"Returns: (Hash) โ
containing the following keys => [Boolean], 'Code' => [String], 'RefNum' => [String], 'Message' => [String]"
Cheers!
Hello I have an issue where I am trying to update or create a customer with their associated Groups. But I can't seem to get it working using Infusionsoft.contact_add({:FirstName => first_name, :LastName => last_name, :Email => email, :Groups => tags.join(',')}) or using the contact_update or data_add or data_update. It seems I can only add or delete a single tag at the time. What am I doing wrong?
When I try to simply do a Infusionsoft.data_update('Contact', 8802, {"Groups" => "123, 321"}) I get an error No Fields sent for Update.
with the contact_add I can get the customer to be created but the tags/groups will not be added. Suggestions?
Thank you
Hi there, I am making the following call to put a customer into a sequence:
Infusionsoft.funnel_achieve_goal("no343","payingcustomer",1234)
As far as I can tell this should work, but when I do that I get this error:
RuntimeError: Wrong size. Was 1068, should be 307
Has this happened to anyone else before? How can I fix this?
Thanks!
a = Infusionsoft.new(:api_key => "Asdf", :api_logger => Logger.new("#{Rails.root}/log/infusionsoft_api.log"))
res = a.contact_add({:FirstName => 'first_name', :LastName => 'last_name', :Email => '[email protected]'})
Expected to get an error as invalid api_key, etc....
However:-
Error is generated and not entered into the infusionsoft_api.log
api_logger method not found.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.