Missing required parameter 'client_secret'


I followed the guide here


on callback.php from the download file (GitHub - square/connect-api-examples: Code samples demonstrating the functionality of the Square Connect API)
always leaves me with this error

Error Processing Request: obtainToken failed! MISSING_REQUIRED_PARAMETER INVALID_REQUEST_ERROR missing required parameter ‘client_secret’

in callback.php file, it has

$body = new ObtainTokenRequest(

and then passes it through

$response = $oauthApi->obtainToken($body);

so I am not sure why it’s not receiving the client_secret

fixed it,
took the set $body parameters from

super frustrating because I don’t understand why there’s a broken example available from square. Literally spent 4 days thinking it was something I was doing wrong, and if I am wrong, please reach out to me!

Thanks for flagging. We will take a look. Glad to hear you got it working. :slightly_smiling_face:

Would you mind explaining how you fixed this in more detail?