Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue updating keywords #75

Closed
aellinwood opened this issue Mar 11, 2022 · 2 comments
Closed

Issue updating keywords #75

aellinwood opened this issue Mar 11, 2022 · 2 comments

Comments

@aellinwood
Copy link

I'm trying to update keywords in existing photos. I have uploads working, can traverse directories, and can get gallery images.

Using the API tool works fine and updates the photos.
https://api.smugmug.com/api/v2/image!addkeywords

But when making this request, I get the same 400 error every time. Any thoughts or working examples?

$options['Async'] = false;
$options['ImageUris'] = [$image]; // the string uri
$options['keywords'] = implode(',',$keywords);

try {
$response = $this->client->post("/api/v2/image!addkeywords",$options);
} catch (\GuzzleHttp\Exception\ClientException $e) {
// always 400
}

@lildude
Copy link
Owner

lildude commented Mar 11, 2022

$options['keywords'] = implode(',',$keywords);

I believe the API is case sensitive so this needs to be Keywords

@aellinwood
Copy link
Author

🤦‍♂️
Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants