If you are traveling to or transiting through Canada, you must apply for an electronic travel authorization (eTA) before your trip.
This requirement applies even if you are only making a short stop or changing planes in Canada.
The eTA is mandatory for travelers who do not need a visa to enter Canada. If you normally require a visa, you do not need to apply for an eTA.
You can apply online through the official website of the Canadian government. Make sure to submit your application well in advance of your trip, and ensure your passport is valid for the entire duration of your travel.