Apple usually recommends that customers of its products use official or authorized accessories to charge their devices. This is because Apple has a certain standard that third-party accessory makers need to meet in order to be considered as an authorized accessory. However, for the most part, a lot of times you could get away with using unauthorized third-party accessories.
Unfortunately, if you’re the owner of the brand new iPad Pro Magic Keyboard accessory, it appears that the device isn’t playing nicely with third-party charging accessories. This is according to several user reports who have noticed that when trying to charge the accessory using a third-party cable or power adapter, they are greeted with a “Not Charging” error message displayed on the tablet’s status bar.
MacRumors has confirmed this to be true when they used an Anker power adapter coupled with an official Apple USB-C cable, suggesting that both the cable and adapter will need to be officially from Apple in order for it to work. However, the results are mixed where some people are reporting no issues on their end, while others are having a hard time.
It is unclear if this is a bug or by design, or if it could be an issue with Apple or the accessories themselves, but until it can be resolved, your best bet would be to use Apple’s official chargers and cables for now.