Introduction
I always used to download patches from My Oracle Support using the wget option because I can download it directly from the host where I want to apply the patches, or at least from some machine that is located in the same infrastructure, instead of downloading it to my laptop or to some VDI. It used to be simple in the past; we were just required to download the wget.sh script from MOS web page, put that script on the server and execute it. During the initial execution, the script would ask for a MOS account and password.
Oracle has been moving toward more secure alternatives and nowadays it doesn’t work with our MOS account and password provided directly to the script anymore. We now need to log in to My Oracle Support and then generate a temporary token that can be used to run the wget script for a few hours.
Getting the WGET script
Here is how you can generate that token.
First I suggest you download and stage the wget.sh script for the patches you want to download, be aware that you can rename that script to something with better meaning in your current task. Here I’m downloading some OEM patches.

I copied that script as get_oem24.1.0.14.sh on a Linux machine.
Getting the Token
1. Authenticate with your account on My Oracle Support: https://support.oracle.com/signin
2. After that, open the Token Generator page in a second tab: https://updates.oracle.com/Orion/GenToken/get_token
3. Click on “Generate Token”

4. Now you can copy the Token content or download the file to your machine.
Since I’m logged into the web browser from my laptop, but intending to use the wget script on a remote Linux server while connected via SSH, it is easier for me to just click Copy and manually create a text file on the remote machine.

Executing the WGET script
For this example, I created the token as “/tmp/mos-token.txt“
With the token file in place, we can execute the wget script with the following syntax:
./wget.sh -T <token file>
My example downloading the OEM 24ai RU 14:

It is important to note that we can reuse the same token for different downloads during the timeout period of 3600 seconds.
AutoUpgrade alternative
I like this approach because it will work with basically any patch delivered by Oracle on My Oracle Support. For Oracle Database and Grid Infrastructure patches I have been using AutoUpgrade utility to accomplish this for the last 2-3 years. But I recently saw a post from Marcus Vinicius about new download types supported by AutoUpgrade which I should start using soon.
What will determine which approach I use is which environment I’m working on. Sometimes I need to download patches on a customer environment where I apply patches very infrequently; I would probably go with the WGET script for a one-time task. But for other environments where I need to download patches frequently, I go with AutoUpgrade because I can set up my wallet once and reuse it many times with no need to get a new token every time.