I am trying to connect between AEM 6.2 - Hybris 6.1 on my local just to explore the OOTB functionalities.
One thing that the connection needs is OAuth authentication credentials from Hybris for AEM.
Now in AEM, below is default screenshot that AEM ships with default credentials. I can change them if I need to.
![](https://forums.adobe.com/api/core/v3/attachments/885629/data)
Now I go to Hybris and create the same oAuth credentials. Below is how the Hybris 6.1 OAuth screen looks. I just filled the details just what AEM has by default (Client ID = mobile_android (We need a better name later), client secret as “secret”. Now I need to fill the Authorities, Client Grant Types, Scopes to grant access to this client.
![](https://forums.adobe.com/api/core/v3/attachments/885597/data)
But something is not correct. AEM is always receiving below error while calling Hybri. But something is not correct. AEM is always receiving below error while calling Hybris . Can someone please help me what are these details that I need to fill in Hybris to make success order creation from AEM to Hybris ?
23.02.2017 15:51:48.823 *WARN* [sling-default-307-default.3247] com.adobe.cq.commerce.hybris.impl.OAuthHandler Failed to execute request after retrying, server responded with status 401
23.02.2017 15:51:48.825 *WARN* [sling-default-307-default.3247] com.adobe.cq.commerce.hybris.common.DefaultHybrisService
com.adobe.cq.commerce.api.NotAuthorizedException: You are not authorized.
at com.adobe.cq.commerce.hybris.common.DefaultHybrisConnection.execute(DefaultHybrisConnecti on.java:247)
at com.adobe.cq.commerce.hybris.common.DefaultHybrisConnection.execute(DefaultHybrisConnecti on.java:283)
at com.adobe.cq.commerce.hybris.common.DefaultHybrisConnection.execute(DefaultHybrisConnecti on.java:269)
at com.adobe.cq.commerce.hybris.importer.DefaultHybrisImporter.importExpressUpdate(DefaultHy brisImporter.java:588)
at com.adobe.cq.commerce.hybris.importer.DefaultHybrisImporter.doImport(DefaultHybrisImporte r.java:219)
at com.adobe.cq.commerce.pim.common.AbstractImporter.run(AbstractImporter.java:167)
at com.adobe.cq.commerce.hybris.importer.DefaultHybrisImporter.updateCatalog(DefaultHybrisIm porter.java:245)
at com.adobe.cq.commerce.hybris.importer.DefaultHybrisImporter.expressUpdate(DefaultHybrisIm porter.java:557)
at com.adobe.cq.commerce.hybris.impl.importer.ExpressUpdateImporter.importData(ExpressUpdate Importer.java:57)
at com.day.cq.polling.importer.impl.PollingImporterImpl.importData(PollingImporterImpl.java: 520)
at com.day.cq.polling.importer.impl.PollingImporterImpl.access$000(PollingImporterImpl.java: 68)
at com.day.cq.polling.importer.impl.PollingImporterImpl$1.run(PollingImporterImpl.java:422)
at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java: 118)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
-Prabu