on ‎2018 Apr 05 12:36 PM
Trying to up the rest webservice so have installed and initialize Hybris 6.5.0.7 B2C.
Then I checked localextention.xml by default ycommercewebservices is there.
Then I created client id(auth2) PFA
Then I access "https://localhost:9002/rest/v2/electronics/catalogs" got the response.
Then I access "https://localhost:9002/authorizationserver/oauth/token?client_id=clientID1&client_secret=123456&gran..." not working.
response :
Request method 'GET' not supported
method_not_allowed
Then i access "https://localhost:9002/rest/v2/electronics/users/" not working.
There is no resource for path /rest/v2/electronics/users
UnknownResourceError
Based on my analysis i suspected this issue may be beacuse client Id(auth2 client id) creation.
Please advice

Request clarification before answering.
Hi
When you ask for oauth token you should use POST not GET (that's why you get error Request method 'GET' not supported method_not_allowed )
Try POST on https://localhost:9002/authorizationserver/oauth/token?client_id=clientID1&client_secret=123456&gran...
Sample calls you can find here : https://help.hybris.com/6.5.0/hcd/8c5efdf686691014a9ddddb7ea19b193.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Creating user is available for { "ROLE_CLIENT", "ROLE_TRUSTED_CLIENT", "ROLE_CUSTOMERMANAGERGROUP" }) so you need token for client or customer manager to be able to register new user.
To get token for client you need set grant_type=client_credentials so something like this : POST on https://localhost:9002/authorizationserver/oauth/token?client_id=clientID1&client_secret=123456&gran...
To make it work with previous token : user john.doe@mail.com should belong to customermanagergroup (then should have ROLE_CUSTOMERMANAGERGROUP)
Hi Kabilan,
You have to assign the ROLE also.
Because not all resources can be accessed by a normal user.
To get all users,
assign ROLE_CUSTOMERGROUP ,ROLE_CUSTOMERMANAGERGROUP,ROLE_TRUSTED_CLIENT
Thanks Sid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sid,
Thanks for response. Still i am unable to create the token. I am using (https://localhost:9002/authorizationserver/oauth/token?client_id=clientID1&client_secret=123456&gran...) this URL to get token.
Can you please correct me if i am wrong.
Thanks Kabilan
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.