Place chocolate and coconut oil in a bowl set over a pan of simmering water.
Stir occasionally until the two are completely melted together.
Leave to cool.
In a bowl, using a hand mixer (or in a stand mixer) beat the eggs, xylitol, vanilla and espresso powder together on high for about 5 minutes until the mixture is pale and thick.
Stir in the cooled chocolate mixture until evenly mixed.
Stir in the almond flour, baking powder, xanthan gum and salt until completely mixed. It will start to stiffen as you mix it.
Leave the cookie dough aside while you line baking sheets with aluminum foil.
The mixture will stiffen. When it is stiff enough to handle, using your hands, roll dough into balls slightly smaller than a golf ball.
Place the balls on the lined baking sheets, about 2 inches apart, and flatten the balls until they are about 2 1/2 inches across.
Bake on the top shelf of the oven for 10 – 12 minutes, turning half way through the baking time. They will look dry, but will be still be soft in the center when they are done.
Remove from the oven and leave on the baking sheet for 10 minutes until the foil and cookies are cool enough to touch.
Lift the edge of the foil up and over with one hand so that you can peel it away from the cookies as they fall into your other hand.
These are rather more fragile than regular cookies, so this method means you will get the cookies off successfully.