api-notebook
api-notebook copied to clipboard
OAuth fail for Smartsheet.
Hi,
OAuth 2.0 fails for Smartsheet.
The error message is:
Error: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.
at o (https://api-notebook.anypoint.mulesoft.com/scripts/api-notebook.js:20:29816)
at https://api-notebook.anypoint.mulesoft.com/scripts/api-notebook.js:20:30388
at j (https://api-notebook.anypoint.mulesoft.com/scripts/api-notebook.js:25:8765)
at k (https://api-notebook.anypoint.mulesoft.com/scripts/api-notebook.js:25:8862)
at https://api-notebook.anypoint.mulesoft.com/scripts/api-notebook.js:25:8971
at XMLHttpRequest.<anonymous> (https://api-notebook.anypoint.mulesoft.com/scripts/api-notebook.js:20:17783)
at XMLHttpRequest.<anonymous> (https://api-notebook.anypoint.mulesoft.com/scripts/api-notebook.js:20:17629)
The first stage of authentication passes fine as I see the window which prompts me to authenticate the application.
I tryed sniffing it with chrome and it showed me request on token uri:
POST https://api-notebook.anypoint.mulesoft.com/proxy/https://api.smartsheet.com/1.1/token
Content-Type:application/x-www-form-urlencoded
code=11gnbs4pvmv0h37w&
grant_type=authorization_code&
redirect_uri=https%3A%2F%2Fapi-notebook.anypoint.mulesoft.com%2Fauthenticate%2Foauth.html&
client_id=***&
client_secret=***
If this request is really the one which is supposed to obtain the token then the error becomes clear, as the request does not have valid format expected by smartsheet:
- They expect query parameters, not form
- They expect the
hash
parameter which "SHA-256 hash of your client secret concatenated with a pipe and the authorization code."
Thus, I have two questions:
- Is the request I see the one which is supposed to obtain token?
- Is it possible to controll Oauth requests from Notebook?
Documentation can be found at https://www.smartsheet.com/developers/api-documentation#h.g2vb66olibzc
Test Notebook is https://api-notebook.anypoint.mulesoft.com/notebooks#476d86bf3c8bc880cc3f
Credentials can be found in the PT story: https://www.pivotaltracker.com/story/show/80644320
Regards, Konstantin.
@KonstantinSviridov can you send me the credentials offline so I can test if that is still a problem.
Could you please tell me if this is still an issue?