"Invalid JWT: Failed audience check." Error when trying to get OAuth Token from Google
<p>I'm trying to get an OAuth2 token from google and keep getting this response:</p>

<pre><code>{
  "error": "invalid_grant",
  "error_description": "Invalid JWT: Failed audience check. The right audience is https://www.googleapis.com/oauth2/v4/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&amp;amp;assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ1cGRhdGUtbG9jYXRpb24tZGF0YUB0b3RlbWljLWd1aWxkLTEyOTIyMC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9wbHVzLmJ1c2luZXNzLm1hbmFnZSIsImF1ZCI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL29hdXRoMi92NC90b2tlbiIsImlhdCI6MTQ2MzY4MjEwOSwiZXhwIjoxNDYzNjg1NjQ5fQ==.a09YUnpiY0FZZFZDUm5PaC91ZkV6ZUtJNGp4WWRWcHY3eFhHNVBXTmw2TGNjZ0JKZThTS2pENitldGNqZzFPMlRRMmNEWWx0aHBNU2k4NS9GeVhnQXdaMHRXVTVEbmcxcXFXQzFRYlp6NmNTZFNlcUt3TElGZjRLeHJCTTgxcVBmVSttQTM0dmprTGtSeEVsWC8vNGpTNDdYM0dobEk2THJOL2xOa2tXcnpEZlk2K1QrNk5OSndyTXhOaTZmcFdXQ09KVE9Gd0tVSnZjYnR1VWNLYnVXbzBqVEhqL056aHBPbkROVW1SSEpYY2JpU3VxVWdRai9PZldiR1p5bzJFK3ZtRzQ5NXdmdDdMMXJkQWdMZkZPcitpeWZVd1FneXVmZFUrRGd1dlZPOWdZSENrS1Fnd0tZb0tUbjNIU29Bcm13OE9OL0RFdkVPM2N2YjhTbFoxbjhRPT0="
}
</code></pre>

<p>The docs for the service account (which I'm using) are here:
<a href="https://developers.google.com/identity/protocols/OAuth2ServiceAccount#authorizingrequests" rel="nofollow">https://developers.google.com/identity/protocols/OAuth2ServiceAccount#authorizingrequests</a></p>

<p>They say:</p>

<p>"A descriptor of the intended target of the assertion. When making an access token request this value is always <a href="https://www.googleapis.com/oauth2/v4/token" rel="nofollow">https://www.googleapis.com/oauth2/v4/token</a>."</p>

<p>So when I form my Claim Set, it looks like this:</p>

<pre><code>{"iss":"********.iam.gserviceaccount.com","scope":"https://www.googleapis.com/auth/plus.business.manage","aud":"https://www.googleapis.com/oauth2/v4/token","iat":1463683812,"exp":1463687352}
</code></pre>

<p>Does anyone know what might be causing my audience check to fail and what I should be using as that value?  Is it possible that other parts of my Token request are incorrect and it just says my audience check is failing?</p>