We are finally trying to correctly implement machine to machine access request, but when we try to do use the client_credentials we get “Client authentication failed.” The log only shows us this:
I think the problem is ours; but looking at our code versus the documentation it gets a little fuzzy as to where to pass the “grant_type”, as we had not used it before and things are working.
That verifies what we got from the links above, which is helpful to us. We just can’t seem to get the same result with our code. So we are looking into it.
The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "grant_type" parameter.
Tried with and without the headers… Still looking for the emoji of beating my head against a wall.
Update: Updated to correct the double form_params array. We also tried a slightly tweaked version of this and get a blank response back from the API.
Update 2: Solved by correctly phrasing the response that we thought was blank.
We did go through the mill. I have this love hate relationship with Guzzle. I think part of the problem is that it has changed so quickly from version to version. But in the end, it is working. Thank you Dan.