This should be very simple, but for the life of me I can not form my cURL request so that Paylocity will accept it. https://www.paylocity.com/integrations/apis/
I keep getting HTTP/1.1 400 Bad Request with json response {"error":"invalid_client"}, which I believe indicates that the data I am sending is not formatted properly. If I mess with the data I can get different response codes. In this case I am simply trying to obtain a bearer token.
curl -v https://apisandbox.paylocity.com/IdentityServer/connect/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization:Basic <base64 encoded clientid:clientsecret>' \
-d 'grant_type = client_credentials&scope = WebLinkAPI'
Anything obviously wrong with the above?
Authorizationheader with a direct--user clientid:clientsecretdirectly and curl will add the base64 encoded basic authorization header for you. While curl should usePOSTautomatically on providing a payload via-d, I prefer to set it explicitly via-X POSTjust to be sure. - Roman Vottner