How to create project access tokens in gitlab?

Nothing in the Gitlab documentation, better would be to use the API: Project access tokens API | GitLab you can even create scripts in bash or python to do all that. So no real need to do it with the Rails console - which is extremely slow anyway. API would be way faster.