A visa/landing permit for Tokelau can needs to be organised in Samoa before you arrive, it is valid for one month. The only public boat is from Samoa.
The visa/landing permit is not strictly enforced but try to have it organised in advance.
Tokelau Government
Tokelau Guide
Tokelau is a territory of New Zealand