Photoshop API: Presets method returns 400 Bad Request with empty body | Adobe Higher Education
Skip to main content
January 6, 2021
解決済み

Photoshop API: Presets method returns 400 Bad Request with empty body

  • January 6, 2021
  • 1 の返信
  • 6583 ビュー

I'm trying to get a successful /lrService/presets call. I got myself a token and assembled a request according to https://github.com/AdobeDocs/lightroom-api-docs#presets but I always get a 400 Bad Request response with a completely empty body. Any ideas?

That's my request:

{
    "curlopts": {
        "HTTPHEADER": [
            "authorization: Bearer eyJ4NXUiOiJpbXNfbmExLWtleS0xLmNlciIsImFsZyI6IlJ...GElSq1Pg",
            "Content-Type: application/json",
            "x-api-key: 448...2c0f"
        ]
    },
    "json": {
        "inputs": {
            "source": {
                "href": "/files/input.jpg",
                "storage": "adobe"
            },
            "presets": {
                "href": "/files/preset.xmp",
                "storage": "adobe"
            }
        },
        "outputs": {
            "href": "/files/output.jpg",
            "storage": "adobe",
            "type": "image/jpeg",
            "overwrite": true
        }
    }
}
このトピックへの返信は締め切られました。
ベストアンサー shayan_c

Hello,

 

I see that the json you are sending is incorrect. Here is the correct format for the /presets call:

 

{ "inputs": { "source": { "href": "/files/acr/input.jpg", "storage": "adobe" }, "presets": [ { "href": "/files/preset.xmp", "storage": "adobe" } ] }, "outputs": [ { "href": "/files/output.jpg", "type": "image/jpeg", "storage": "adobe", "overwrite": true } ] }

 

Please let me know if this works! And apologies that the response body is empty with no further info. We will have that fixed and ensure that we return the correct error messages.

 

Also for further questions/concerns you can reach out to us directly at: psdservices@adobe.com

 

Thanks

-Shayan

1 の返信

shayan_cAdobe Employee回答
Adobe Employee
January 6, 2021

Hello,

 

I see that the json you are sending is incorrect. Here is the correct format for the /presets call:

 

{ "inputs": { "source": { "href": "/files/acr/input.jpg", "storage": "adobe" }, "presets": [ { "href": "/files/preset.xmp", "storage": "adobe" } ] }, "outputs": [ { "href": "/files/output.jpg", "type": "image/jpeg", "storage": "adobe", "overwrite": true } ] }

 

Please let me know if this works! And apologies that the response body is empty with no further info. We will have that fixed and ensure that we return the correct error messages.

 

Also for further questions/concerns you can reach out to us directly at: psdservices@adobe.com

 

Thanks

-Shayan

malkow作成者
January 6, 2021
Thanks, now I receive a result body: {"title":"Unauthorized","code":401,"type":"InvalidAuthTokenError","details":{"reason":"Unable to access the input href","name":"/files/input.jpg"}}