© 2018 The Authors. Human activities create novel food resources that can alter wildlife–pathogen interactions. If resources amplify or dampen, pathogen transmission probably depends on both host ecology and pathogen biology, but studies that measure responses to provisioning across both scales are rare. We tested these relationships with a 4-year study of 369 common vampire bats across 10 sites in Peru and Belize that differ in the abundance of livestock, an important anthropogenic food source. We quantified innate and adaptive immunity from bats and assessed infection with two common bacteria. We predicted that abundant livestock could reduce starvation and foraging effort, allowing for greater investments in immunity. Bats from high-livestock sites had higher microbicidal activity and proportions of neutrophils but lower immunoglobulin G and proportions of lymphocytes, suggesting more investment in innate relative to adaptive immunity and either greater chronic stress or pathogen exposure. This relationship was most pronounced in reproductive bats, which were also more common in high-livestock sites, suggesting feedbacks between demographic correlates of provisioning and immunity. Infection with both Bartonella and haemoplasmas were correlated with similar immune profiles, and both pathogens tended to be less prevalent in high-livestock sites, although effects were weaker for haemoplasmas. These differing responses to provisioning might therefore reflect distinct transmission processes. Predicting how provisioning alters host–pathogen interactions requires considering how both within-host processes and transmission modes respond to resource shifts. This article is part of the theme issue ‘Anthropogenic resource subsidies and host–parasite dynamics in wildlife’.