You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please never share your API secret anywhere publically. I've gone ahead and deleted this from your post but please go into your account and create a new API key to use.
That being said it looks like you're trying to inject values from a properties file into your Java application using Spring's @value annotation, but it appears there might be a small issue with your configuration.
I'm not super familiar with Java but I believe you need to declare a new instance of Cloudinary:
I was also getting this issue, while working in nodejs, because api keys were not properly configured and loaded when I try to upload a file. If still you are getting this issue, check ur configs and make sure where ever you are using cloudinary service, api keys are properly loaded.
There was an unexpected error (type=Internal Server Error, status=500).
Must supply api_key
java.lang.IllegalArgumentException: Must supply api_key
//here is my proprties file code
#cloudinary configurations
cloudinary.cloud.name=ddxv9r6it
cloudinary.api.key=884911427739699
cloudinary.api.secret=DELETED
//its AppConfig file
@configuration
public class AppConfig {
@value("${cloudinary.cloud.name}")
private String cloudName;
@value("${cloudinary.api.key}")
private String apiKey;
@value("${cloudinary.api.secret}")
private String apiSecret;
@bean
public Cloudinary cloudinary() {
ObjectUtils.asMap(
"cloud_name", cloudName,
"api_key", apiKey,
"api_secret", apiSecret);
return new Cloudinary();
}
}
The text was updated successfully, but these errors were encountered: