Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

Adobe IO Runtime Post API call not working

Avatar

Level 1

Hello All,

 

I am trying to setup Adobe IO Runtime and I followed the documentation below -

 

For Creating the action for Get Rest API I referred below document

https://developer.adobe.com/runtime/docs/guides/using/creating_actions/
https://developer.adobe.com/runtime/docs/guides/using/creating_rest_apis/

And GET is working fine.
Then I created POST Rest API by following the above link but it is not working and giving error via Postman.

{
  "code": "G1dCusDDKH8BwzihMHcqUKLiY3xc5i3A",
  "error": "The requested resource does not exist."
}

I think it is because of the authentication but I always try with new JWT token as it got expires in 15 minutes.

Later I followed the steps mentioned in the below document -

https://developer.adobe.com/app-builder/docs/getting_started/first_app/


There I created the App by two ways
a. "Bootstrapping new App using the CLI - Developer is Logged in as Enterprise Organization user"

After deploying the code by running the cmd "aio app run" I am getting error.
"Error: EPERM: operation not permitted, symlink"


b. "Bootstrapping new App using the CLI - Developer without any credentials"

The project is getting deployed and I can see the UI is getting launched on the browser but still getting error while invoking the action. In this I even disabled the property in app.config.yaml file "require-adobe-auth: false" but still same error.

 

prajwal_akolnerkar8_0-1677520914192.png

Could you please help me with the POST API call in Adobe IO Runtime.

Thanks,
Prajwal

2 Replies

Avatar

Community Advisor

Hi @prajwal_akolnerkar8 

 

How are you trying to make the post call from your postman - via AEM? Can you share the POST call?

 

If it's a POST-call-related issue, We can solve this issue by including the basic auth type in Postman, then allowing incoming POST requests in the Apache Sling Referrer Filter OSGI configurations, and removing the requirement of the CSRF-Token in the Adobe Granite CSRF Filter OSGI configurations.

 

Hope it helps!

Thanks,
Kiran Vedantam.

Hi @Kiran_Vedantam ,
I am not using AEM here. I have written Node JS code with my logic in my local.
Then I created an action for the node js file and mapped the action to an api path. Then I when I try to deploy to the code getting Error. (Follow - 
https://developer.adobe.com/runtime/docs/guides/using/creating_rest_apis/). Calling the Node JS directly is running and getting response but when I try by calling the POST Service via PostMan then it is giving error. 
In Headers, I have added the Token which I generated by Including the IO Managed API service in developer console.

prajwal_akolnerkar8_0-1677578878400.png

Thanks,
Prajwal