You can get the ID from GetQuestLogTitle. Here is a snippet from my code in
QuestSounds; (GetQuestLogTitle returns more values, but I didn't put those in variables since I didn't need them).
Code:
local title, level, _, _, _, complete, daily, id = GetQuestLogTitle(index)
local link = GetQuestLink(id)