Github token login not working

I want to make an extension, but when i generate a token (with “repo” and “public_repo”) it says: ‘Invalid token format’. Can someone help me or tell me why it isn’t working?