There is no strict timeline for developing an addiction, but recent studies suggest that people who take opioids for longer than five days are at a higher risk of becoming addicted than those whose course of treatment is shorter than this. The rule of thumb to follow is that the longer you take opioids, the greater your likelihood of dependency and addiction.
This also depends on what type of opioids you take. People who start out on a course of long-acting opioids are more likely to become addicted to them than those given short-acting opioids. Best practice is to take opioids for the shortest possible amount of time. If you are prescribed opioids for longer than three days make sure you and your doctor have a clear idea of your treatment goals and that you understand the risks of addiction. There’s no harm in asking your doctor to clarify why they are prescribing you a course of opioids or to seek out alternatives if they are available.