From macOS Sierra 10.2.2, you can take screenshots of the Touch Bar using keyboard shortcuts (shortcut keys) or the app “Grab”.

Mac - Take Touch Bar Screenshot with Shortcut, App “Grab”

App “Touche”

Mac - Taking Screenshots - Keyboard Shortcuts Mac App “Grab” - Takes a screenshot of the entire screen after 10 seconds Mac - Screenshot App “Eidetic” with timer

See here for how to use and set up the Touch Bar/Touch ID.

How to use and set up Touch Bar/Touch ID