ensure the $TOKEN parameter is set in the injected ci variables. You can do it in either your project or a parent directory of the project to apply the variable more globally.
Project > Settings > CI/CD > "Variables"