Is it the same error? The one other thing I can think of is that it needs to be form data, not json. But I think the error would be different than invalid client.
Also this thread may help (although it is postman/curl not python): Creating token return 405 error