s6y Telefonica S A F-3ASR

Telefonica S A F-3ASR, filed May 13, 2015: Consent of experts

Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the reference to our firm under the caption “Experts” in this Registration Statement (Form F-3) and related Prospectus of Telefónica, S.A. for the registration of ordinary shares of Telefónica, S.A. and the rights to subscribe to such ordinary shares and debt securities of Telefónica Emisiones, S.A.U. guaranteed by Telefónica, S.A. and to the incorporation by reference therein of our reports dated February 27, 2015, with respect to the consolidated financial statements of Telefónica, S.A. and subsidiaries, and the effectiveness of internal control over financial reporting of Telefónica, S.A., included in its Annual Report (Form 20-F) for the year ended December 31, 2014, filed with the Securities and Exchange Commission.

/s/ Ernst & Young, S.L.

Madrid, Spain

May 13, 2015