The Japanese and US embassies in Bangkok have urged their citizens in Thailand to be alert for a possible terrorist attack.