All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
This story was reported by At-Tabaraani in “Al-Mu’jam Al-Kabeer”, and it was reported by Ad-Daaraqutni in his “Sunan” and also by Al-Bayhaqi in his “Sunan” on the authority of Abu ‘Uthmaan An-Nahdi : “A magician was playing games in front of Al-Waleed Ibn ‘Uqbah, and he used to take the sword and slaughter himself, and he repeats that without being harmed, then Jundub [Jundub ibn Ka'b Al-Azdi, may Allaah be pleased with him ] took the sword and cut his (the magician’s) head off, and then he recited the verse in which Allaah Says (what means): {So would you approach magic while you are aware [of it]?”}[Quran 21:3]
As regards the narration in which he said: “If he is truthful, let him bring himself back to life.”; it was reported by Al-Bayhaqi in “Dalaa’il an-Nubowwah” as stated by Ibn Hajar .
Allaah Knows best.