on 2018 Jul 18 11:05 AM
I am working with the Android B2C app. Whenever I try to login or register a new user I am getting the following error.
07-18 00:09:32.656 13152-13168/com.hybris.mobile.app.commerce.b2c.dev E/Volley: [2226] BasicNetwork.performRequest: Unexpected response code 401 for https://192.168.13.15:9002/authorizationserver/oauth/token
07-18 00:09:33.063 13152-13168/com.hybris.mobile.app.commerce.b2c.dev E/Volley: [2226] BasicNetwork.performRequest: Unexpected response code 401 for https://192.168.13.15:9002/authorizationserver/oauth/token
07-18 00:09:33.064 13152-13218/com.hybris.mobile.app.commerce.b2c.dev E/com.hybris.mobile.lib.http.manager.volley.VolleyPersistenceManager: Error with the Volley request 37ce0f0d-2a5f-45a2-9da5-f66701aa4eed: {"error":"invalid_client","error_description":"Bad client credentials"}
Can anyone please help me with this.
Request clarification before answering.
Figured out how to solve the issue Just add the below impexes
INSERT_UPDATE OAuthClientDetails;clientId[unique=true] ;resourceIds ;scope ;authorizedGrantTypes ;authorities ;clientSecret ;registeredRedirectUri ;client-side ;hybris ;basic ;implicit,client_credentials ;ROLE_CLIENT ;secret ;http://localhost:9001/authorizationserver/oauth2_implicit_callback; ;mobile_android ;hybris ;basic ;authorization_code,refresh_token,password,client_credentials ;ROLE_CLIENT ;secret ;http://localhost:9001/authorizationserver/oauth2_callback;
INSERT_UPDATE OAuthClientDetails;clientId[unique=true] ;resourceIds ;scope ;authorizedGrantTypes ;authorities ;clientSecret ;registeredRedirectUri ;trusted_client ;hybris ;extended ;authorization_code,refresh_token,password,client_credentials ;ROLE_TRUSTED_CLIENT ;secret; ;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check this--essentialdata_assistedservicewebservices.impex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is like webservice error. I'll try to explain it via webservice example. When you try to hit any webservice url, it check that the person who is trying to access it i an authorized user. So what happens it looks for oauth token. For tis you need to create a client which will be used to create a token an evantually use that token to access you urls.
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 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.