I applied in Indonesia while I was visiting family there. I used the arrival stamp in my passport and the remaining blank pages to show that I hadn't left the country, plus a letter from the owner of the home I was staying in and a photo of us in front of the home.