Can you pet parrots?

Every morning, I walk past a cafe where a gray parrot sits on a perch and whistles at me. I always greet it, and it responds with a whistle. I've wanted to pet it, but I'm afraid it might bite me. I've even offered it peanuts and shown it my peaceful intentions. I've also seen…