Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Dear Nguyễn Quyết Tiến,
Welcome to Microsoft Community.
We understand that you need to set up a code to help you generate a download link from a shared link.
According to your description, you have previously used the code to generate a download link from OneDrive's shared link and used it, but now an error occurs.
OneDrive can share file or folder information with others and edit or save files together, but when generating a link, it is a shared link. If you need to generate a download link at the same time, you need to use the code to help you confirm it together.
Problems with OneDrive code that require more technical information to help you solve them are covered in a dedicated section in Microsoft learn (English only). Experts there may know more about how to solve your problem.
It is designed to support advanced users like you. Many users prefer to ask questions and get more professional responses through this section.
Here is a link to a forum where you can raise specific issues and share your ideas for solving the problem.
Finally, although I can't help you further, I hope the information I provide can help you find a better direction.
I will keep this issue on file in case our great volunteers come up with ideas for you.
Best regards
Zenobia.Z | Microsoft Community Support Specialist