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:
- Redirect the user to the authorization link with the parameters in the URL
- 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
- 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) - You will receive a Refresh Token and an Access Token to store and use as a json payload
- 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