They are not immune for the non-official act of soliciting or accepting bribes in exchange for an official act, which is the charge of bribery.
So if the President took a bribe in order to make someone ambassador to Sweden, they could not be prosecuted for making that person the ambassador, but they could be prosecuted for taking the bribe.