Exhibit 23.1 CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS We consent to incorporation by reference in the Registration Statements on Form S-3 (Nos. 33-47399, 33-51326, 33-67936, 33-82562, 33-88972, 333-00759, 333-042527 and 333-69815) and in the related prospectuses, and on Form S-8 pertaining to the 1992 Stock Plan (Nos. 333-06841 and 333-60585), the 1997 Employee Stock Purchase Plan (No. 333-35151), and the 2002 Equity Incentive Plan and Non-Qualified Stock Option Plan (No. 333-90428) of our report dated February 19, 2003, with respect to the 2002 and 2001 consolidated financial statements and schedule of A.P. Pharma, Inc. included in this Annual Report (Form 10-K) for the year ended December 31, 2002. /s/Ernst & Young LLP Palo Alto, California March 26, 2003