Unknown API key from node js
I'm trying to upload files to cloudinary from nodejs, I've verified my account and inputted my key and secret into config. But I get this error each time { message: 'Unknown API key xxxxxxxxxxx;', http_code: 401 }. I've gone as far as generating a new pair but the error still persists.
```
-
With nodeJS, you might want to try:
var cloudinary = require('cloudinary').v2;
cloudinary.config({ cloud_name: 'sample', api_key: '874837483274837', api_secret: 'a676b67565c6767a6767d6767f676fe1' });
cloudinary.uploader.upload("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", function(error, result) {console.log(result, error); });
Please let me know if that works,
Post is closed for comments.
Comments
2 comments