Strange behaviour in photoshopActions REST API

Hello,

I’m encountering an issue when trying to execute a custom Photoshop action through the Adobe Photoshop API. My action set is named Merge, and it contains a single action named Merge Layer. When I specify the actionName as "string" in my payload, the code executes without errors, and the output file is uploaded to my S3 bucket, but the action does not seem to be applied. However, if I change actionName to the exact name of my action, "Merge Layer", the code fails to execute - no file gets uploaded, and I receive no specific error message from the API.

Here’s the relevant part of my code:

import requests

def invoke_photoshop_action(action_url, image_input_url, image_output_url, headers):
    payload = {
        "inputs": [
            {
                "storage": "external",
                "href": image_input_url
            }
        ],
        "options": {
            "actions": [
                {
                    "storage": "external",
                    "href": action_url,
                    "actionName": "Merge Layer"  # This is the exact action name
                }
            ]
        },
        "outputs": [
            {
                "storage": "external",
                "href": image_output_url,
                "type": "image/vnd.adobe.photoshop",
                "overwrite": True,
                "compression": "large"
            }
        ]
    }

    try:
        response = requests.post('https://image.adobe.io/pie/psdService/photoshopActions', json=payload, headers=headers)
        response.raise_for_status()  # This will raise an error for HTTP error responses
        print("Photoshop Action API Response:", response.json())  # Assuming JSON response
        return response
    except requests.HTTPError as e:
        print(f"HTTP Error: {e.response.status_code} - {e.response.text}")
    except Exception as e:
        print(f"Error: {e}")

I have double-checked the action name for case sensitivity and spaces, ensured my API token has the necessary permissions, and verified my S3 bucket policy. Despite these checks, the issue persists.

Could anyone provide insights into what might be causing this specific actionName to fail or suggest any additional troubleshooting steps I could take?

Thank you in advance for your help!

P.S. - Additional Context on API Responses:

For this issue, as well as other API calls I make, the response I typically receive is structured as follows:

{
  "_links": {
    "self": {
      "href": "https://image.adobe.io/pie/psdService/status/9682f16e-3234-4b07-9d00-9d78839bdc6d"
    }
  }
}

When I follow the provided link to check the status, I encounter an error message stating “Oauth token is not valid.” Interestingly, aside from this error message, my other API calls work as expected and achieve the intended outcomes. This issue seems to be an exception where the action doesn’t apply, and I’m curious if the OAuth token error is related or if there are additional underlying problems affecting this specific Photoshop action execution.

Hi there!

For a variety of historic reasons, the right forum for the Photoshop API is over here on the regular community forums. They also have a dedicated email address for developer questions: psdservices@adobe.com