@Jack ***************
the department of consular affairs would be one of the departments of the MFA. They deal with consular issues, Passports, etc. You'll need to go to a specific location that offers legalisation services, as most branches they have would be only passport offices. You need to book an appointment, they don't accept walk in anymore (at least not in the two Bangkok offices)
Otherwise just pay for an agent to do it if you want a hassle free option.