Getting Internal Server Error When Pulling Multiple Leads

Anonymous
Not applicable

I successfully pulled leads ID from 1 to 99900. However, the same API call does not work for leads ID larger than 99900. Below is the code that I used to pull leads from the Rest API.

require 'rest_client'

require 'json'

marketo_instance = my_marketo_instance

endpoint = "/rest/v1/leads.json"

#Replace with your access token

auth_token = "?access_token=" + my_token

#Replace with filter type and values

for x in (333..647)

  initial_num = x*300+1

  final_num = 300*(x+1)

  ids_needed = (initial_num..final_num).to_a.join(",")

  filter_type_and_values = "&filterType=Id&filterValues=" + ids_needed

  fields = "&fields=SFGA%5F%5FCorrelationID%5F%5Fc,SFGA%5F%5FCorrelation%5FData%5F%5Fc,SFGA%5F%5FWeb%5FSource%5F%5Fc,Company%5FType%5F%5Fc,Job%5FFunction%5F%5Fc,LinkedIn%5FProfile%5F%5Fc,Personal%5FTwitter%5F%5Fc,Corporate%5FTwitter%5F%5Fc,Company%5FTicker%5F%5Fc,Email%5FType%5F%5Fc,bit%5Fly%5Fusername%5F%5Fc,Dashboard%5FDomain%5F%5Fc,short%5FURL%5F%5Fc,Timestamp%5F%5Fc,Extention%5F%5Fc,Source%5FType%5F%5Fc,HubSpot%5FInc%5F%5FHubSpot%5FIntelligence%5F%5Fc,HubSpot%5FInc%5F%5FNumberofLocations%5F%5Fc,HubSpot%5FInc%5F%5FSICCode%5F%5Fc,HS%5FINT%5FAdWords%5F%5Fc,Notes%5FAbout%5FNew%5FLead%5F%5Fc,HS%5FINT%5FKeyword%5F%5Fc,Lead%5FConverted%5FDate%5F%5Fc,Lead%5FCreate%5FDate%5F%5Fc,Lead%5FCreate%5Fto%5FConvert%5F%5Fc,Converted%5FMonth%5F%5Fc,hubspot%5Fassigned%5Flead%5Fstatus%5F%5Fc,Hubspot%5FUsesBItly%5F%5Fc,Hubspot%5FScore%5F2%5F%5Fc,Hubspot%5FJob%5FFunction%5F%5Fc,Hubspot%5FCompany%5FSize%5F%5Fc,Hubspot%5FIndustry%5F%5Fc,Hubspot%5FSocialPlatforms%5F%5Fc,Hubspot%5FTotalTwtFollowers%5F%5Fc,Activity%5FCount%5F%5Fc,hubspot%5Ffirst%5Fevent%5F%5Fc,Lead%5FSource%5FDetail%5F%5Fc,Last%5FOwner%5FChange%5FDate%5F%5Fc,SDR%5F%5Fc,Elliot%5FUpdate%5FField%5F%5Fc,Lead%5FStage%5F%5Fc,Time%5Fto%5FConvert%5F%5Fc,Status%5FUnassigned%5F%5Fc,Status%5FAssigned%5F%5Fc,Status%5FAttempting%5FContact%5F%5Fc,Status%5FQualifying%5F%5Fc,Status%5FConverted%5Fto%5FOpportunity%5F%5Fc,Status%5FDead%5F%5Fc,Status%5FRemarketing%5F%5Fc,Status%5FDate%5FUnassigned%5F%5Fc,Status%5FDate%5FAssigned%5F%5Fc,Status%5FDate%5FAttempting%5FContact%5F%5Fc,Status%5FDate%5FQualifying%5F%5Fc,Status%5FDate%5FConverted%5Fto%5FOpportunity%5F%5Fc,Status%5FDate%5FDead%5F%5Fc,Status%5FDate%5FRemarketing%5F%5Fc,Previous%5FLead%5FOwner%5F%5Fc,Days%5FUnassigned%5Fto%5FAssigned%5F%5Fc,Days%5FAssigned%5Fto%5FAttempting%5FContact%5F%5Fc,Days%5FAttempting%5FContact%5Fto%5FQualifying%5F%5Fc,Days%5FQualifying%5Fto%5FConverted%5Fto%5FOpport%5F%5Fc,Days%5FQualifying%5Fto%5FDead%5F%5Fc,Days%5FQualifying%5Fto%5FRemarketing%5F%5Fc,Dead%5FLost%5FReason%5F%5Fc,Title%5FScore%5F%5Fc,Bitly%5FActivity%5FScore%5F%5Fc,Score%5FJob%5FFunction%5F%5Fc,Lead%5FScore%5F%5Fc,Lead%5FConvert%5F%5Fc,Pricing%5FCampaign%5F%5Fc,RecordTypeId%5Faccount,Twitter%5FAccount%5F%5Fc,Facebook%5FPage%5F%5Fc,Bitly%5FUsername%5F%5Fc,Currently%5FUsing%5FBitly%5F%5Fc,Total%5FClosed%5FRevenue%5F%5Fc,Total%5FOpen%5FRevenue%5F%5Fc,HubSpot%5FInc%5F%5FSync%5FFrom%5FHubSpot%5F%5Fc,Intuit%5FSFforQB%5F%5FCredit%5FLimit%5F%5Fc,Intuit%5FSFforQB%5F%5FCustomer%5FList%5FId%5F%5Fc,Intuit%5FSFforQB%5F%5FDataSync%5FModified%5FDate%5F%5Fc,Intuit%5FSFforQB%5F%5FEmail%5F%5Fc,Intuit%5FSFforQB%5F%5FFirst%5FName%5F%5Fc,Intuit%5FSFforQB%5F%5FLast%5FName%5F%5Fc,Intuit%5FSFforQB%5F%5FOpen%5FBalance%5F%5Fc,Intuit%5FSFforQB%5F%5FQuickBooks%5FCategory%5FType%5F%5Fc,Intuit%5FSFforQB%5F%5FReady%5FTo%5FSync%5F%5Fc,Intuit%5FSFforQB%5F%5FSalesRep%5F%5Fc,Intuit%5FSFforQB%5F%5FTerms%5F%5Fc,Total%5FOpen%5FRenewal%5FRevenue%5F%5Fc,Vertical%5F%5Fc,Active%5FClient%5F%5Fc,Client%5FTier%5F%5Fc,Domain%5FUnique%5FID%5F%5Fc,Decodes%5FOrganic%5F%5Fc,Encodes%5FOrganic%5F%5Fc,Last%5FData%5FUpdate%5F%5Fc,Top%5FGHash%5F1%5F%5Fc,Top%5FGHash%5F2%5F%5Fc,Top%5FGHash%5F3%5F%5Fc,Top%5FGHash%5F4%5F%5Fc,Top%5FGHash%5F5%5F%5Fc,Click%5FCount%5F1%5F%5Fc,Click%5FCount%5F2%5F%5Fc,Click%5FCount%5F3%5F%5Fc,Click%5FCount%5F4%5F%5Fc,Click%5FCount%5F5%5F%5Fc,Account%5FRevenue%5F%5Fc,Receive%5FBitly%5FNewsletter%5F%5Fc,LinkedIn%5FMember%5FToken%5F%5Fc,Skype%5F%5Fc,Timezone%5F%5Fc,Left%5FCompany%5F%5Fc,Receive%5Fnewsletter%5F%5Fc,Intuit%5FSFforQB%5F%5FCustomer%5FListID%5F%5Fc,Intuit%5FSFforQB%5F%5FQuickBooks%5FPrimary%5FContact%5F%5Fc,Username%5F%5Fc,Admin%5FUsername%5F%5Fc,Created%5FBy%5FText%5F%5Fc,Bitly%5FUser%5F%5Fc,Role%5F%5Fc,Top%5FLink%5F1%5F%5Fc,Top%5FLink%5F2%5F%5Fc,Top%5FLink%5F3%5F%5Fc,Top%5FLink%5F4%5F%5Fc,Top%5FLink%5F5%5F%5Fc,mkto%5Fsi%5F%5FHideDate%5F%5Fc,mkto%5Fsi%5F%5FMSIContactId%5F%5Fc,mkto%5Fsi%5F%5FSales%5FInsight%5F%5Fc,Number%5Fof%5FEmployees%5F%5Fc,Number%5Fof%5FEmployees%5F%5Fc%5Faccount,Conversion%5FTemplate%5F%5Fc,Lead%5FNumber%5F%5Fc,Round%5FRobin%5FID%5F%5Fc,jsImpacts%5F%5FAdded%5Ffrom%5FData%5Fcom%5F%5Fc,jsImpacts%5F%5FData%5Fcom%5Fdo%5Fnot%5Fauto%5Fupdate%5F%5Fc,jsImpacts%5F%5FData%5Fcom%5Fmanaged%5F%5Fc,jsImpacts%5F%5FImported%5Ffrom%5FJigsaw%5F%5Fc,jsImpacts%5F%5FAdded%5Ffrom%5FData%5Fcom%5F%5Fc%5Faccount,jsImpacts%5F%5FData%5Fcom%5FManaged%5F%5Fc%5Faccount,jsImpacts%5F%5FData%5Fcom%5FMatched%5F%5Fc,jsImpacts%5F%5FData%5Fcom%5Fdoes%5Fnot%5Fauto%5Fupdate%5F%5Fc,jsImpacts%5F%5FImported%5Ffrom%5FJigsaw%5F%5Fc%5Fcontact,custom%5Fcname,Customer%5FSegment%5F%5Fc,Update%5Fvia%5FMarketo%5F%5Fc,Total%5FActive%5FRevenue%5F%5Fc,GSD%5FAward,Account%5FRevenue%5F%5Fc%5Flead,Campaign%5FNew%5FEmail%5F%5Fc,Vertical%5F%5Fc%5Flead,Social%5FMedia%5FTools%5FIntegrations%5F%5Fc,Agencies%5F%5Fc,Parent%5FCompany%5F%5Fc,Parent%5FCompany%5Fdel%5F%5Fc,Number%5Fof%5FSeats%5F%5Fc,Number%5Fof%5FDomains%5F%5Fc,API%5FCall%5FLimit%5F%5Fc,Publicity%5FContract%5FLanguage%5F%5Fc,Number%5Fof%5FBitly%5FAccounts%5F%5Fc,Upsell%5FPotential%5F%5Fc,Notes%5F%5Fc,Onboarding%5FComplete%5FDate%5F%5Fc,Company%5FSize%5F%5Fc,Website%5FAdditional%5FComments%5F%5Fc,Website%5FUsing%5FBrand%5FTools%5Ffor%5F%5Fc,Lead%5FSource%5FDetail%5FC%5F%5Fc,Lead%5FSource%5FType%5F%5Fc,Drip%5FExpire%5F%5Fc,Activate%5FDrip%5F%5Fc,Has%5FComments%5F%5Fc,Create%5FMonth%5F%5Fc,Active%5FPrice%5FIncrease%5FMRR%5F%5Fc,Active%5FRenewal%5FMRR%5F%5Fc,Open%5FRenewal%5FMRR%5F%5Fc,Queue%5FLead%5FCompany%5FSize%5F%5Fc,Success%5FManager%5F%5Fc,Open%5FNew%5FBusiness%5FMRR%5F%5Fc,SEM%5FGoogle%5FLead%5F%5Fc,SEM%5FBing%5FLead%5F%5Fc,SEM%5FLead%5F%5Fc,Account%5FCount%5F%5Fc,Total%5FActive%5FMRR%5F%5Fc,Churn%5FRisk%5F%5Fc,Parent%5FOwner%5F%5Fc,Open%5FRenewal%5FMRR%5Fdel%5F%5Fc,Total%5FOpen%5FNB%5FMRR%5F%5Fc,Open%5FRenewal%5FMRR%5Fdel%5Fdel%5F%5Fc,Integrated%5Fwith%5FBitly%5F%5Fc,Function%5Fof%5FPlatform%5F%5Fc,Key%5FUsage%5FMetric%5F%5Fc,Nature%5Fof%5FIntegration%5F%5Fc,Lead%5FCount%5F%5Fc"

  request_url = marketo_instance + endpoint + auth_token + filter_type_and_values + fields

  #Make request

  response = RestClient.get request_url

  #Returns Marketo API response

  puts response

end

The error message I got:

/Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/abstract_response.rb:48:in `return!': 500 Internal Server Error (RestClient::InternalServerError)

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:246:in `process_result'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:188:in `block in transmit'

        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:852:in `start'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:182:in `transmit'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:68:in `execute'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:35:in `execute'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient.rb:71:in `get'

        from get_leads.rb:21:in `block in <main>'

Tags (1)
5 REPLIES 5
Kenny_Elkington
Marketo Employee

Can you provide the raw request and response?  You can redact the access token, and munchkin id.

Anonymous
Not applicable

______

Kenny_Elkington
Marketo Employee

Sorry, no, I just need the raw request and response from your call.  I don't need your access token or munchkin id.  I suggest you edit your post to remove both of those.  Thanks.

Anonymous
Not applicable

Request:

****/rest/v1/leads.json?access_token=***&filterType=Id&filterValues=99901,99902,99903,99904,99905,99906,99907,99908,99909,99910,99911,99912,99913,99914,99915,99916,99917,99918,99919,99920,99921,99922,99923,99924,99925,99926,99927,99928,99929,99930,99931,99932,99933,99934,99935,99936,99937,99938,99939,99940,99941,99942,99943,99944,99945,99946,99947,99948,99949,99950,99951,99952,99953,99954,99955,99956,99957,99958,99959,99960,99961,99962,99963,99964,99965,99966,99967,99968,99969,99970,99971,99972,99973,99974,99975,99976,99977,99978,99979,99980,99981,99982,99983,99984,99985,99986,99987,99988,99989,99990,99991,99992,99993,99994,99995,99996,99997,99998,99999,100000,100001,100002,100003,100004,100005,100006,100007,100008,100009,100010,100011,100012,100013,100014,100015,100016,100017,100018,100019,100020,100021,100022,100023,100024,100025,100026,100027,100028,100029,100030,100031,100032,100033,100034,100035,100036,100037,100038,100039,100040,100041,100042,100043,100044,100045,100046,100047,100048,100049,100050,100051,100052,100053,100054,100055,100056,100057,100058,100059,100060,100061,100062,100063,100064,100065,100066,100067,100068,100069,100070,100071,100072,100073,100074,100075,100076,100077,100078,100079,100080,100081,100082,100083,100084,100085,100086,100087,100088,100089,100090,100091,100092,100093,100094,100095,100096,100097,100098,100099,100100,100101,100102,100103,100104,100105,100106,100107,100108,100109,100110,100111,100112,100113,100114,100115,100116,100117,100118,100119,100120,100121,100122,100123,100124,100125,100126,100127,100128,100129,100130,100131,100132,100133,100134,100135,100136,100137,100138,100139,100140,100141,100142,100143,100144,100145,100146,100147,100148,100149,100150,100151,100152,100153,100154,100155,100156,100157,100158,100159,100160,100161,100162,100163,100164,100165,100166,100167,100168,100169,100170,100171,100172,100173,100174,100175,100176,100177,100178,100179,100180,100181,100182,100183,100184,100185,100186,100187,100188,100189,100190,100191,100192,100193,100194,100195,100196,100197,100198,100199,100200&fields=SFGA%5F%5FCorrelationID%5F%5Fc,SFGA%5F%5FCorrelation%5FData%5F%5Fc,SFGA%5F%5FWeb%5FSource%5F%5Fc,Company%5FType%5F%5Fc,Job%5FFunction%5F%5Fc,LinkedIn%5FProfile%5F%5Fc,Personal%5FTwitter%5F%5Fc,Corporate%5FTwitter%5F%5Fc,Company%5FTicker%5F%5Fc,Email%5FType%5F%5Fc,bit%5Fly%5Fusername%5F%5Fc,Dashboard%5FDomain%5F%5Fc,short%5FURL%5F%5Fc,Timestamp%5F%5Fc,Extention%5F%5Fc,Source%5FType%5F%5Fc,HubSpot%5FInc%5F%5FHubSpot%5FIntelligence%5F%5Fc,HubSpot%5FInc%5F%5FNumberofLocations%5F%5Fc,HubSpot%5FInc%5F%5FSICCode%5F%5Fc,HS%5FINT%5FAdWords%5F%5Fc,Notes%5FAbout%5FNew%5FLead%5F%5Fc,HS%5FINT%5FKeyword%5F%5Fc,Lead%5FConverted%5FDate%5F%5Fc,Lead%5FCreate%5FDate%5F%5Fc,Lead%5FCreate%5Fto%5FConvert%5F%5Fc,Converted%5FMonth%5F%5Fc,hubspot%5Fassigned%5Flead%5Fstatus%5F%5Fc,Hubspot%5FUsesBItly%5F%5Fc,Hubspot%5FScore%5F2%5F%5Fc,Hubspot%5FJob%5FFunction%5F%5Fc,Hubspot%5FCompany%5FSize%5F%5Fc,Hubspot%5FIndustry%5F%5Fc,Hubspot%5FSocialPlatforms%5F%5Fc,Hubspot%5FTotalTwtFollowers%5F%5Fc,Activity%5FCount%5F%5Fc,hubspot%5Ffirst%5Fevent%5F%5Fc,Lead%5FSource%5FDetail%5F%5Fc,Last%5FOwner%5FChange%5FDate%5F%5Fc,SDR%5F%5Fc,Elliot%5FUpdate%5FField%5F%5Fc,Lead%5FStage%5F%5Fc,Time%5Fto%5FConvert%5F%5Fc,Status%5FUnassigned%5F%5Fc,Status%5FAssigned%5F%5Fc,Status%5FAttempting%5FContact%5F%5Fc,Status%5FQualifying%5F%5Fc,Status%5FConverted%5Fto%5FOpportunity%5F%5Fc,Status%5FDead%5F%5Fc,Status%5FRemarketing%5F%5Fc,Status%5FDate%5FUnassigned%5F%5Fc,Status%5FDate%5FAssigned%5F%5Fc,Status%5FDate%5FAttempting%5FContact%5F%5Fc,Status%5FDate%5FQualifying%5F%5Fc,Status%5FDate%5FConverted%5Fto%5FOpportunity%5F%5Fc,Status%5FDate%5FDead%5F%5Fc,Status%5FDate%5FRemarketing%5F%5Fc,Previous%5FLead%5FOwner%5F%5Fc,Days%5FUnassigned%5Fto%5FAssigned%5F%5Fc,Days%5FAssigned%5Fto%5FAttempting%5FContact%5F%5Fc,Days%5FAttempting%5FContact%5Fto%5FQualifying%5F%5Fc,Days%5FQualifying%5Fto%5FConverted%5Fto%5FOpport%5F%5Fc,Days%5FQualifying%5Fto%5FDead%5F%5Fc,Days%5FQualifying%5Fto%5FRemarketing%5F%5Fc,Dead%5FLost%5FReason%5F%5Fc,Title%5FScore%5F%5Fc,Bitly%5FActivity%5FScore%5F%5Fc,Score%5FJob%5FFunction%5F%5Fc,Lead%5FScore%5F%5Fc,Lead%5FConvert%5F%5Fc,Pricing%5FCampaign%5F%5Fc,RecordTypeId%5Faccount,Twitter%5FAccount%5F%5Fc,Facebook%5FPage%5F%5Fc,Bitly%5FUsername%5F%5Fc,Currently%5FUsing%5FBitly%5F%5Fc,Total%5FClosed%5FRevenue%5F%5Fc,Total%5FOpen%5FRevenue%5F%5Fc,HubSpot%5FInc%5F%5FSync%5FFrom%5FHubSpot%5F%5Fc,Intuit%5FSFforQB%5F%5FCredit%5FLimit%5F%5Fc,Intuit%5FSFforQB%5F%5FCustomer%5FList%5FId%5F%5Fc,Intuit%5FSFforQB%5F%5FDataSync%5FModified%5FDate%5F%5Fc,Intuit%5FSFforQB%5F%5FEmail%5F%5Fc,Intuit%5FSFforQB%5F%5FFirst%5FName%5F%5Fc,Intuit%5FSFforQB%5F%5FLast%5FName%5F%5Fc,Intuit%5FSFforQB%5F%5FOpen%5FBalance%5F%5Fc,Intuit%5FSFforQB%5F%5FQuickBooks%5FCategory%5FType%5F%5Fc,Intuit%5FSFforQB%5F%5FReady%5FTo%5FSync%5F%5Fc,Intuit%5FSFforQB%5F%5FSalesRep%5F%5Fc,Intuit%5FSFforQB%5F%5FTerms%5F%5Fc,Total%5FOpen%5FRenewal%5FRevenue%5F%5Fc,Vertical%5F%5Fc,Active%5FClient%5F%5Fc,Client%5FTier%5F%5Fc,Domain%5FUnique%5FID%5F%5Fc,Decodes%5FOrganic%5F%5Fc,Encodes%5FOrganic%5F%5Fc,Last%5FData%5FUpdate%5F%5Fc,Top%5FGHash%5F1%5F%5Fc,Top%5FGHash%5F2%5F%5Fc,Top%5FGHash%5F3%5F%5Fc,Top%5FGHash%5F4%5F%5Fc,Top%5FGHash%5F5%5F%5Fc,Click%5FCount%5F1%5F%5Fc,Click%5FCount%5F2%5F%5Fc,Click%5FCount%5F3%5F%5Fc,Click%5FCount%5F4%5F%5Fc,Click%5FCount%5F5%5F%5Fc,Account%5FRevenue%5F%5Fc,Receive%5FBitly%5FNewsletter%5F%5Fc,LinkedIn%5FMember%5FToken%5F%5Fc,Skype%5F%5Fc,Timezone%5F%5Fc,Left%5FCompany%5F%5Fc,Receive%5Fnewsletter%5F%5Fc,Intuit%5FSFforQB%5F%5FCustomer%5FListID%5F%5Fc,Intuit%5FSFforQB%5F%5FQuickBooks%5FPrimary%5FContact%5F%5Fc,Username%5F%5Fc,Admin%5FUsername%5F%5Fc,Created%5FBy%5FText%5F%5Fc,Bitly%5FUser%5F%5Fc,Role%5F%5Fc,Top%5FLink%5F1%5F%5Fc,Top%5FLink%5F2%5F%5Fc,Top%5FLink%5F3%5F%5Fc,Top%5FLink%5F4%5F%5Fc,Top%5FLink%5F5%5F%5Fc,mkto%5Fsi%5F%5FHideDate%5F%5Fc,mkto%5Fsi%5F%5FMSIContactId%5F%5Fc,mkto%5Fsi%5F%5FSales%5FInsight%5F%5Fc,Number%5Fof%5FEmployees%5F%5Fc,Number%5Fof%5FEmployees%5F%5Fc%5Faccount,Conversion%5FTemplate%5F%5Fc,Lead%5FNumber%5F%5Fc,Round%5FRobin%5FID%5F%5Fc,jsImpacts%5F%5FAdded%5Ffrom%5FData%5Fcom%5F%5Fc,jsImpacts%5F%5FData%5Fcom%5Fdo%5Fnot%5Fauto%5Fupdate%5F%5Fc,jsImpacts%5F%5FData%5Fcom%5Fmanaged%5F%5Fc,jsImpacts%5F%5FImported%5Ffrom%5FJigsaw%5F%5Fc,jsImpacts%5F%5FAdded%5Ffrom%5FData%5Fcom%5F%5Fc%5Faccount,jsImpacts%5F%5FData%5Fcom%5FManaged%5F%5Fc%5Faccount,jsImpacts%5F%5FData%5Fcom%5FMatched%5F%5Fc,jsImpacts%5F%5FData%5Fcom%5Fdoes%5Fnot%5Fauto%5Fupdate%5F%5Fc,jsImpacts%5F%5FImported%5Ffrom%5FJigsaw%5F%5Fc%5Fcontact,custom%5Fcname,Customer%5FSegment%5F%5Fc,Update%5Fvia%5FMarketo%5F%5Fc,Total%5FActive%5FRevenue%5F%5Fc,GSD%5FAward,Account%5FRevenue%5F%5Fc%5Flead,Campaign%5FNew%5FEmail%5F%5Fc,Vertical%5F%5Fc%5Flead,Social%5FMedia%5FTools%5FIntegrations%5F%5Fc,Agencies%5F%5Fc,Parent%5FCompany%5F%5Fc,Parent%5FCompany%5Fdel%5F%5Fc,Number%5Fof%5FSeats%5F%5Fc,Number%5Fof%5FDomains%5F%5Fc,API%5FCall%5FLimit%5F%5Fc,Publicity%5FContract%5FLanguage%5F%5Fc,Number%5Fof%5FBitly%5FAccounts%5F%5Fc,Upsell%5FPotential%5F%5Fc,Notes%5F%5Fc,Onboarding%5FComplete%5FDate%5F%5Fc,Company%5FSize%5F%5Fc,Website%5FAdditional%5FComments%5F%5Fc,Website%5FUsing%5FBrand%5FTools%5Ffor%5F%5Fc,Lead%5FSource%5FDetail%5FC%5F%5Fc,Lead%5FSource%5FType%5F%5Fc,Drip%5FExpire%5F%5Fc,Activate%5FDrip%5F%5Fc,Has%5FComments%5F%5Fc,Create%5FMonth%5F%5Fc,Active%5FPrice%5FIncrease%5FMRR%5F%5Fc,Active%5FRenewal%5FMRR%5F%5Fc,Open%5FRenewal%5FMRR%5F%5Fc,Queue%5FLead%5FCompany%5FSize%5F%5Fc,Success%5FManager%5F%5Fc,Open%5FNew%5FBusiness%5FMRR%5F%5Fc,SEM%5FGoogle%5FLead%5F%5Fc,SEM%5FBing%5FLead%5F%5Fc,SEM%5FLead%5F%5Fc,Account%5FCount%5F%5Fc,Total%5FActive%5FMRR%5F%5Fc,Churn%5FRisk%5F%5Fc,Parent%5FOwner%5F%5Fc,Open%5FRenewal%5FMRR%5Fdel%5F%5Fc,Total%5FOpen%5FNB%5FMRR%5F%5Fc,Open%5FRenewal%5FMRR%5Fdel%5Fdel%5F%5Fc,Integrated%5Fwith%5FBitly%5F%5Fc,Function%5Fof%5FPlatform%5F%5Fc,Key%5FUsage%5FMetric%5F%5Fc,Nature%5Fof%5FIntegration%5F%5Fc,Lead%5FCount%5F%5Fc

Response:

/Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/abstract_response.rb:48:in `return!': 500 Internal Server Error (RestClient::InternalServerError)

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:246:in `process_result'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:188:in `block in transmit'

        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:852:in `start'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:182:in `transmit'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:68:in `execute'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient/request.rb:35:in `execute'

        from /Library/Ruby/Gems/2.0.0/gems/rest_client-1.8.3/lib/restclient.rb:71:in `get'

        from get_leads.rb:21:in `block in <main>'

        from get_leads.rb:12:in `each'

        from get_leads.rb:12:in `<main>'

Kenny_Elkington
Marketo Employee

It looks like it's not even making to the the API layer.  You'll need to file a support ticket so that our Engineering team can look at this.