To activate OAuth integration you have to create a SmartThings application. To do so use the smartthings-cli. To install the CLI use the installation steps from the documentation.
If installation succeeded use the apps:create command to create a new application. While creating the application make sure you use the matching redirect URL and scopes defined below.
You will now be redirected to login at SmartThings home page where you have to select desired location and confirm access for selected scopes.
Afterwards you will be redirected to httpbin. This page will show the OAuth response that is needed for continuing. To do so paste the args.code value in next step of the wizard.
Do now paste args.code value shown at httpbin below.
Your access and refresh token will now be requested and set automatically.
When tokens have been filled in OAuth setup has been successful and you will be redirected to main config page.