I am making a call from postman to the same proxy and i am able to generate access token but when making a similar call using ajax with same client id and secret ... I am bale to generate the auth code but access token generation is failing giving me error {"ErrorCode" : "invalid_client", "Error" :"ClientId is Invalid"}.
THe request is same in both the cases but is working fine with postman but not with ajax.
Please could you post the Ajax request you are making, including any headers?
If you are using the Auth Code grant type, and the API is compliant with the specifications then your request should look like this:
https://tools.ietf.org/html/rfc6749#section-4.1.3
In that case, it is likely that the client_id is invalid or missing.
I am sending Content-type as "application/json" in both the cases but its working when request is send from postman but not with ajax. client id is correct and is same for both forms of request.
Content-Type | application/json |
---|
{"clientId":"******","clientSecret":"******"}
Thats my sample request in both the cases from postman and ajax
In both the cases auth code is getting generated successfully but in case of ajax call generate access token is failing
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |