In the classic tale, Ali Baba learns the magic words "Open Sesame" by overhearing a thief. He uses this phrase to open the cave entrance. Later, the clever slave girl Morgiana also uses it to outwit the thieves.
There is no other "magic phrase" in the story; "Open Sesame" is the sole command that opens and seals the cave.