trevorburke | 2019-12-03 23:42:38 UTC | #1
In the docs on how to Base64 encode the suggestion for encoding via the Terminal is slightly misleading. I was confounded when I continually received HTTP 400 responses when attempting to retrieve a token using cURL while my attempts using Python were successful.
Until I came upon this Stack Overflow post that stated that a newline character is added to the end of the output of running base64. When I employed this post's author's suggestion to add -w 0 to my base64 code, it successfully generated a token.
Just a heads up that this may be useful to make note! I've learned a lot about APIs, OAuth, and HTTP from working with your API explorer and SDKs and so very thankful and wanted to share a quick suggestion.
tim.smith | 2019-12-04 15:09:07 UTC | #2
Ah, thanks for pointing that out! We'll get the page updated.
tim.smith | 2019-12-04 15:34:38 UTC | #3
What OS are you using? -w isn't a valid option on OSX.
trevorburke | 2019-12-04 16:59:13 UTC | #4
This was on Ubuntu Linux
tim.smith | 2019-12-04 17:27:36 UTC | #5
That was my guess, thanks for confirming. That page will be updated with a note about this behavior, but not the code example since -w doesn't work on both platforms.
system | 2020-01-04 17:27:37 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 6626