It is advised to always use the cable supplied or recommended by the manufacturer.
Answered by Dave, Electrical Safety Expert
In theory yes, but it's always advisable to use the USB cable that was supplied with your device or an alternative recommended by the manufacturer. USB cables can have different current ratings, depending on their intended use, and the cable could overheat if the charging current is too high.
You should always follow the manufacturer’s instructions.