Fixed api token generation.

This fixes a stupid typo that broke api token generation.