Note: Your "Account" and your "Application" are distinct entities.
If you try to upload to an album on your account, thinking your application has access rights to it because they are tied to the same email, you'll probably get the 417 error.
Also, it seems that imgur validates the .PNG file before validating access rights.
I have concluded that as you are trouble shooting , this is a rough gauge of "how close to success" you are:
1: VERY CLOSE :
"Internal Expectation Failed"
Your .PNG payload within the form-data is probably correct.
2: COLDER :
"We Don't Support That File Type"
You probably corrupted your .PNG binary file when attempting to concat it into the "form-data" payload.
3: COLDEST :
"bad request"
You messed up real bad.
If you are rolling your own "multi-part form-data" like I did, one of the posters here has a good low-level example that does NOT use 3rd party libraries:
NodeJS Request how to send multipart/form-data POST request
Your payload is constructed something like this:
payload=Buffer.concat([
Buffer.from( formdata_string_top , "utf8" )
, Buffer.from( png_binary_file , "binary" )
, Buffer.from( final_formdata_boundary, "utf8" )
]);;
You might be tempted to do this , because it is readable in your
logs, but it WILL_CORRUPT_YOUR_BINARY_FILE
payload=Buffer.concat([
Buffer.from( formdata_string_top , "utf8" )
, Buffer.from( png_binary_file , "binary" )
, Buffer.from( final_formdata_boundary, "utf8" )
]).toString( "utf8" );