Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Working with Shared Content?

Avatar

Level 2

Hi,

I recently started exploring AEM Mobile. I'm almost done with the basics and was exploring some of the complex stuff. For creating the shared content, I read this Tutorial.

I basically have a few questions related to this article.

1. Firstly, I'm unable to really create a Shared Content (Step 3). I'm using Advance REST Client of Chrome but it always gives me 401 Unauthorized Error with below response. I'm not sure how do I pass my credentials in the request.

{

"error_code": "401013"

"message": "Oauth token is not valid"

}

I'm running the example document in a local server http://localhost:3000/#!/Producer-Service-Entity.json/createOrUpdateEntity. And as per that, I'm supposed to hit https://pecs.publish.adobe.io host for all the URL's given in Tutorial, if I'm not mistaken.

Also, I'm passing the following required headers for this request.

X-Dps-Client-Session-Id: d826085a-488b-7378-9f49-36899739376e

X-Dps-Client-Request-Id: d34a1f5f-d444-8bd1-1772-941b06d2987f

X-Dps-Client-Version: 0.0.1

X-Dps-Api-Key: Pb-int-Unity-CD

2. Also, I've another doubt with respect to Step 10 of Tutorial. When we reference the Shared files, should we use "shared" in reference path or should we use the Shared content entity's name we created like in the tutorial it is "sc_one"?

<script src="../shared/js/logic.js"></script>

                                        (or)

<script src="../sc_one/js/logic.js"></script>

Any help is appreciated.

0 Replies