Depending on which city you are visiting, generally speaking you can use international driving license (if you have one).
The problem however lies on the human aspect.
I know many foreigners riding scooter without proper license in Bali, Lombok or some other small cities, where these rules can be more lenient toward tourists. You can find loads of places where you can rent a scooter for as cheap as $10/day (excl. fuel). Most of them only requires you to hand over a copy of your passport or some refundable deposit.
But if you are planning to explore big cities such as Jakarta, Surabaya, Semarang it is much better if you just rent a car.
I think it would be best to get in touch with the local department of Indonesian Traffic. Usually it is not allowed as per the country rules but can be applicable if you certify yourself through Indonesian Government Rules. The main reason for not applicable is due to the rules of driving in particular country. Then also it would be best as I said to get in touch with there local department.
Credit:stackoverflow.com‘