Expand my Community achievements bar.

SOLVED

Photoshop API Custom Actions Confusion

Avatar

Level 1

Im creating an application with the Server to Server authentication which will be a 2 legged OAuth

https://developer.adobe.com/developer-console/docs/guides/authentication/ServerToServerAuthenticatio...

 

The documentation uses a POST request to https://ims-na1.adobelogin.com/ims/token/v3 with credentials from my developer account to generate an access token using cURL.

 

The application Im creating will allow me to upload an image and use a stored action file to perform an action on that photo using the API

 

Where Im getting confused is in 2 places:

 

1) when I go to the API documentation (https://developer.adobe.com/photoshop/photoshop-api-docs/api/#tag/Photoshop/operation/photoshopActio...) for Execute Photoshop Actions POST request it looks as though in the header parameters it requires a Bearer token (which I can't find anywhere)

 

2) This POST is going to a different link than the credentials https://image.adobe.io/pie/psdService/photoshopActions

 

Should I be making 2 different calls every time, one for the credentials and another to execute photoshop actions.

 

The documentation is a little confusing to me because I'm new at this and trying to figure everything out and doesn't seem clear cut (there are articles some depreciated that don't clearly define the setup).

 

Any suggestions, help or insights would be greatly appreciated!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 1

Solved.

I needed to use OAuth 2 Custom token.

Token endpoint needed my client_id in the link string.

 

x-api-key could be put in the shared header of the OAuth Token endpoint (POST).

Authorization Bearer not needed (this was confusing).

 

 

View solution in original post

2 Replies

Avatar

Level 1

I believe Im halfway there I was able to initializes the call for the Server to Server credentials (POST to https://ims-na1.adobelogin.com/ims/token/v3) and it returned the

"access_token": "string of characters",

"token_type": "bearer", 

"expires_in": 86399

 

I'm still trying to figure out the 2nd part to execute the actual photoshop actions POST call to https://image.adobe.io/pie/psdService/photoshopActions 

 

I do get an error when initializing that call:

{"error_code":"401013","message":"Oauth token is not valid"} 

 

Should I be trying to pass the received info from the first post request into this second post request?

Avatar

Correct answer by
Level 1

Solved.

I needed to use OAuth 2 Custom token.

Token endpoint needed my client_id in the link string.

 

x-api-key could be put in the shared header of the OAuth Token endpoint (POST).

Authorization Bearer not needed (this was confusing).