{ "error": "invalid_grant", "error_description": "Bad Request" }

352 views
Skip to first unread message

Ak

unread,
Apr 9, 2015, 8:06:43 PM4/9/15
to google-analyti...@googlegroups.com

I have come to the point where I have created the JWT (huffffff), however, every time I make the POST call using ajax, It throws me this error

 {
 "error": "invalid_grant",
 "error_description": "Bad Request"
}

What does this mean? 

Please hep !


Ak

unread,
Apr 9, 2015, 9:54:31 PM4/9/15
to google-analyti...@googlegroups.com
How do I synchronize my server with NTP? Thats what I am getting from searching for this issue. I am using this code, but it seems to be giving errors

private static int[] GetExpiryAndIssueDate()
    {
        var utc0 = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
        var issueTime = DateTime.UtcNow;

        var iat = (int)issueTime.Subtract(utc0).TotalSeconds;
        var exp = (int)issueTime.AddMinutes(55).Subtract(utc0).TotalSeconds; // Expiration time is up to 1 hour, but lets play on safe side
        Console.WriteLine(iat);
        Console.WriteLine(exp);
        Console.ReadKey();
        return new[] { iat, exp };
Reply all
Reply to author
Forward
0 new messages