title: How do i use Dialogflow V2 API in my spring boot application? I have successfully implemented it using V1 API
body: <p>Okay so i have created a chatbot in ionic that makes GET request to my spring boot application. My spring boot application makes an API call to Dialogflow using the RestTemplate exchange method. I have successfully implemented it for V1 API. But for V2 integration the token expires in 1 hour. So i did some research and found out that i had to set up a secure account and follow the process and gcloud would give me the new token(After executing it in terminal and made an API call using postman). But i am unable to use this command in eclipse. I get the error ==> The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials.</p>
  
  <p>I tried it by installing the google cloud SDK followed the documentation steps but it was of no help.</p>
  
  <p>I even tried it with the GoogleCredential dependency but i could not get the access token (got it as null).</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Edit. </p>
  
  <p>Have answered the question below.</p>