Exhibit 23.1 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM We consent to the incorporation by reference in the following Registration Statements: 1) Registration Statement (Form S-3 No. 33-88972), of A.P. Pharma, Inc., 2) Registration Statement (Form S-3 No. 333-00759), of A.P. Pharma, Inc., 3) Registration Statement (Form S-3 No. 333-042527), of A.P. Pharma, Inc., 4) Registration Statement (Form S-3 No. 333-69815), of A.P. Pharma, Inc., 5) Registration Statement (Form S-3 No. 333-115163), of A.P. Pharma, Inc., 6) Registration Statement (Form S-8 No. 333-06841), pertaining to the 1992 Stock Plan of A.P. Pharma, Inc., 7) Registration Statement (Form S-8 No. 333-60585), pertaining to the 1992 Stock Plan of A.P. Pharma, Inc., 8) Registration Statement (Form S-8 No. 333-35151), pertaining to the 1997 Employee Stock Purchase Plan of A.P. Pharma, Inc., 9) Registration Statement (Form S-8 No. 333-90428), pertaining to the 2002 Equity Incentive Plan and Non-Qualified Stock Option Plan of A.P. Pharma, Inc., and 10) Registration Statement (Form S-8 No. 333-118546), pertaining to the 2002 Equity Incentive Plan and 1997 Employee Stock Purchase Plan of A.P. Pharma, Inc.; of our reports dated March 11, 2005 with respect to the consolidated financial statements and schedule of A.P. Pharma, Inc., A.P. Pharma, Inc. management's assessment of the effectiveness of internal control over financial reporting, and the effectiveness of internal control over financial reporting of A.P. Pharma, Inc., included in this Annual Report (Form 10-K) for the year ended December 31, 2004. /s/ERNST & YOUNG LLP Palo Alto, California March 11, 2005