cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Access is denied while testing Personalization Core Trail

Former Member
0 Kudos
727

I am following hybris trails and I am stuck at

Getting started -> Trails -> Personalization Core Trail -> Retrieve Trigger Data -> Test personalizationwebservices Extension

I got auth token from step 2, now in step 3, I can't access API from the auth token.

When I am sending request:

curl --insecure --verbose --header "Authorization: Bearer my-auth-token" https://localhost:9002/personalizationwebservices/v1/catalogs/electronicsContentCatalog/catalogVersi...

I get this response

{ "errors": [ { "message": "Access is denied", "type": "ForbiddenError" } ] }

Accepted Solutions (1)

Accepted Solutions (1)

former_member747843
Active Participant
0 Kudos

Hi
Your client need to have personalizationwebservices scope.
Update client definition:

 INSERT_UPDATE OAuthClientDetails;clientId[unique=true]    ;resourceIds       ;scope        ;authorizedGrantTypes                                            ;authorities             ;clientSecret   
                                 ;oauth_client           ;hybris            ;basic,personalizationwebservices        ;refresh_token,password,client_credentials    ;ROLE_CLIENT             ;secret

and get token again

Former Member
0 Kudos

Thank you. It worked!

0 Kudos

Hi

I have checked with the above solution.

These all the details already added with o auth client but still facing below mentioned error,while hitting API.

I have placed this method in usersController.java and tried with Postman as well as Jmeter. Can you please help me on this?Is their any more authorization required?

{ "errors" : [ { "message" : "Access is denied", "type" : "ForbiddenError" } ] }

Answers (0)