AEM 6.5 AMS/Local OAuth2.0 + Assets HTTP api not working, it works with basic auth
We’re trying to implement a server to server integration with AEM 6.5 AMS (not Cloud), and I’ve been trying to set it up locally.
I got the OAuth2.0 client working (created the client in the OAuth Clients section of the Security Tools.
Given the access to the oauthserver service users, created a ScopeWithPrivileges class giving read/write access to the /content/dam path for the service to use.
I’m able to get the Bearer token correctly, but when I tried to upload an asset by posting to
http://localhost:4502/api/assets/companies/product-staging/new_test.png
I’m getting a 500
with a status.message
"status.message": "Can't create child on a synthetic root",
the same call using basic auth for the same user (admin), works correctly.
Anyone ever done this with the AssetAPI or are we stuck using basic auth for this?
I’m half guessing something isn’t right with the ScopeWithPrivilege class, if anyone succeeded knows what we’re doing wrong would be greatly appreciated.