@Gregory ******
You apply via the eVisa portal. you select the embassy that is responsible for the country you are currently in. That embassy will then handle your application. So if you are in your home country then you select it. if you are in vietnam then you select the appropriate embassy for your location. same for every country. these embassies then all have different requirements. you need to upload a proof of location. in your home country that is any official letter like an electricity bill or bank letter or sometimes local id card with your registered adress… in a foreign country that might be entry stamp in your passport, hotel booking, etc.. if you stay in a foreign country, or even in thailand and select your home countries thai embassy or a different countries thai embassy then you are gaming the system and the chances are that they will find out and deny you. in germany for example they started to invite people for in-person interviews.
tldr: officialy you have to be outside of thailand. use the evisa portal with the correct embassy selected to apply and get your visa.