Google Maps directions error message

I am getting an error message when trying to get directions: "Oops, we couldn't calculate the directions". I understand this may be related to API issues, however I have no place to input the API key. Would you be kind to help me out? I have already granted access.
Thanks in advance