The present invention discloses a modified exendin or pharmaceutically acceptable salts thereof, wherein the modified exendin comprises an amino acid sequence having at least 90% sequence identity to SEQ ID No. 17 and the amino acid sequence has a higher stability than the non-modified exendin of SEQ ID No. 4. These compounds are useful in treating type 2 diabetes as GLP-1 receptor agonists.