Hello Support Team, We are receiving a 403 Forbidden status when creating contact through APIs. We are using Ruby on Rails Framework and uses "constantcontact" gem. Here is the sample code we used to store bulk contacts. @cc = ConstantContact::Api.new(application_key, user_account_token)
@list_id = @cc.get_lists[0].id
users_info.each do |user|
response = @cc.get_contact_by_email(user.email)
next if response && response.respond_to?(:results) && !response.results.empty?
contact = {'first_name'=> "#{user.first_name}", 'last_name' => "#{user.last_name}" }
email = { 'email_address' => "#{user.email}"}
contact['email_addresses'] = []
contact['email_addresses'] << email contact['lists'] = []
contact['lists'] << { :id => @list_id }
new_contact = ConstantContact::Components::Contact.create(contact)
@cc.add_contact(new_contact) # We are getting 403 forbidden for this line
end It's observed that sometimes APIs workes correctly and save the record in the user's constant contact account but most of the time it returns 403 Forbidden.
... View more