Preheat your oven to 350°F (175°C). Line a baking sheet with parchment paper.
Melt the unsweetened chocolate in a microwave-safe bowl, heating in 30-second intervals until smooth. Allow it to cool.
In a large mixing bowl, combine granulated sugar, vegetable oil, and vanilla extract. Whisk until well blended. Add the melted chocolate and mix until incorporated.
Crack in the eggs, one at a time, mixing well after each addition. If using, add the espresso granules.
In a separate bowl, whisk together flour, baking powder, and salt. Gradually add to the wet ingredients, stirring until just combined.
Cover the bowl with plastic wrap and refrigerate the dough for at least 30 minutes.
Use a cookie scoop or spoon to portion out the dough, roll into balls, and coat in confectioners’ sugar.
Place the dough balls on the prepared baking sheet, spacing them about 2 inches apart. Bake for 10-12 minutes.
Allow the cookies to cool on the baking sheet for a few minutes before transferring to a cooling rack.