on ‎2018 Jul 18 7:59 PM
Hi, I have created a webservice and for that I used the ycommercewebservices template. Now in my custom webservice I have to call the API https://localhost:9002/ws410/rest/customers, but I get authorization errors. I know that Hybris web services authentification mechanism is based on OAuth. So I checked if the implex file salmpledata-oauthclients.impex was imported. And then when I want to get a token using Postman, the following error appears:
{ "error": "unauthorized", "error_description": "Bad credentials" }
My user is correctly assigned to webservicegroup. Do you know if there is any configuration that I missed?.
Thanks and best regards, Aldo!
Request clarification before answering.
Hi Satish,
If your end point is secured, that requires authentication and token generation before accessing the endpoint. Looking at the response, it seems the /customers requires you to authenticate the user.
You can get access_token with https://localhost:9002/authorizationserver/oauth/token and pass client_id, client_secret, grant_type(as password in most cases), username & password.
and while accessing your endpoint use /customers?access_token=
Hope it helps!
Cheers
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aldo,
Can you please let me know, like 'How did you get rid of the authentication error?'. Is it the problem with the access token expiration or refresh?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aldo, add the following user group to your integration user :
customersupportmanagergroup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 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.