title: Firebase Cloud Messaging HTTP V1 API: How to Get the Auth 2.0 Access Token with REST Calls?
body: <p>In order to use the <code>HTTP V1 API</code> (not the legacy API) with PHP, the REST interface has to be used. </p>
  
  <p><a href="https://firebase.google.com/docs/cloud-messaging/send-message#top_of_page" rel="nofollow noreferrer">https://firebase.google.com/docs/cloud-messaging/send-message#top_of_page</a></p>
  
  <p>I am wondering how to get the Auth 2.0 access token?</p>
  
  <p><a href="https://firebase.google.com/docs/cloud-messaging/auth-server" rel="nofollow noreferrer">https://firebase.google.com/docs/cloud-messaging/auth-server</a></p>
  
  <p>As there is no <code>Google API Client Library</code> for PHP (see examples in the link above), how can the Auth 2.0 token be received with REST calls (no need to show PHP code)?</p>
  
  <p>The related question: once received this short living token, how to refresh this token? What is the workflow?</p>
  
  <p>Thanks a lot!</p>