"Taylor Swift wrote 'This is What You Came For' under the pseudonym Nils Sjoberg," the rep told the magazine.
TMZ had reported Swift's rumored involvement earlier in the day. Sources told the website the singer wrote the song for Harris during their relationship and recorded a full demo with the DJ in the studio.
Insiders said Swift and Harris ultimately agreed to keep the collaboration secret, but that the singer kept publishing rights to the song. Harris instead released the track with Rihanna in April and the song became an instant hit.
Swift and Harris announced their split just weeks after the song's debut. Sources now say "the breaking point" came when Harris publicly dismissed the idea of working with Swift the day their secret collaboration was released.
Swift has since started dating actor Tom Hiddleston. The pair were spotted kissing shortly after the singer's split from Harris and made their Instagram debut as a couple last week.