Go to your Developer Dashboard (login using your regular Buy Me a Coffee account, if needed).
Click Create New Token in the upper right corner.
Enter an appropriate name to identify the token (e.g. "Coffee Companion Token"), and check the read-only checkbox. Then click the Create button.
Your Personal Access Token is displayed in the box. Right-click it and choose Select All in the menu to select the whole token. Then right-click it again and select Copy to copy the token into your clipboard.
Next, return to the Coffee Companion app, open Settings and select the Authentication tab. Ensure the textarea is emtpy, right-click it and select Paste and your token should now appear.
Your token is automatically validated, and if all is good a green checkmark should be displayed in the lower right corner. If it is a red cross, then the token is not correct. Make sure you didn't accidently added something else.
In case anything goes wrong, you can repeat this process as many times you want.