Firstly, the author's intentions are important. If this book/movie/article/game is intended to be historical fiction (think Downton Abbey or Apocalypse Now), then the author/creator would have full license to create their own dialogue and events. Within reason, of course - such fictional works typically have to retain a certain level of authenticity in the dialogue and costumes.
If the book is intended as an academic study of an event or period in time, many authors these days choose to refrain from using apocryphal quotes. In cases where there is no verbatim (or reliable) record of a conversation or meeting, authors will often choose to discuss the intentions or outcomes of the meeting, rather than speculate on what each participant said.
In cases where someone has given exact quotes, you could always check their footnotes or endnotes (which a reliable book should have). There will often be references to the author's sources for these quotes, which will also help to give you a better idea of the reliability of the quote.