Expand my Community achievements bar.

PhotoShop API Error

Avatar

Level 1

Hello


I have created project for Adobe Photoshop API (Trial)

 

I have JWT token 

I am able to generate Bearer AccessToken properly. Following is the code :

var client = new RestClient("https://image.adobe.io/lrService/edit");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("Authorization", bearertoken);
request.AddHeader("x-api-key", ApiKey);
request.AddHeader("Content-Type", "application/json");
request.Parameters.Clear();

string data = "{\"inputs\": {\"source\": {\"href\": \"unedited/image.jpg\",\"storage\": \"external\"}},\"options\": {\"Whites\": 80},\"outputs\": [{\"href\": \"edited/image.jpg\",\"type\": \"image/jpeg\",\"storage\": \"external\"}]}";

request.AddParameter("application/json", data, ParameterType.RequestBody);

string responseFromServer = "";
IRestResponse response = client.Execute(request);
responseFromServer = response.Content;


I am getting response as :
{"error_code":"401013","message":"Oauth token is not valid"}


Please help me out with this error, how I can resolve it please advise.

 

thanks

Topics

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

1 Reply