Always geting missiong parameter code or invaild client identifier

always geting missing parameter code or invalid client identifier
in infusionsoft API - token creations

I would recommend carefully reading the Getting Started with OAuth2 - Keap Developer Portal , as it is a common if somewhat lengthy process:

  1. Redirect the user to the authorization link with the parameters in the URL
  2. When the user is redirected back to your application, a POST will hit your endpoint with an authorization code as a URL parameter such as code=65xfeCkQ
  3. POST to the /token endpoint with a Header of "content-type":"application/x-www-form-urlencoded" and the parameters set in the POST body (not json formatted)
  4. You will receive a Refresh Token and an Access Token to store and use as a json payload
  5. When the Access Token expires (24h), you can use the Refresh Token to generate a new Refresh Token and Access Token to store as a json payload