loop api token generation to avoid dups