cancel
Showing results for 
Search instead for 
Did you mean: 

How to get API response For Accounts.Register API Method

krishnakumar_1712
Participant
0 Kudos

HI Team

We are using accounts.register API for registering users and we have user verification via email enabled. Hence after registering the user successfully, API is returning an error code for "Pending User verification". Hence method de.hybris.platform.gigya.gigyaservices.service.impl.DefaultGigyaService#callRawGigyaApiWithConfigAndObject throws an error.

My requirement is, I would like to get a response as it is after completing registration via API (I need UID to proceed to further implementation). I know one possible way is to override the existing method But I don't prefer it before checking with you guys.

Any possible way to get a response as it is with OOTB code?

Any possible solution to get an error code = 0 for pending user verification status(accounts.register)?

Kindly help here.

Regards

Eldhos

Accepted Solutions (0)

Answers (2)

Answers (2)

Kunal_Bansal
Active Contributor

Hi eldhos,

As per my knowledge, as you've user verification via email enabled, you need to overwrite this method.

Br,

Kunal, SAP CX Architect

olehi941
Active Participant
0 Kudos

Hi Eldhos,

There is no possible solution to get an error code = 0 for pending user verification, as it would crash predefined registration workflows.
Just FYI: It is not your case, I would say the opposite, but you can use httpStatusCodes parameter with true and change the behavior of the response(but as I highlighted it isn't your case).

You mentioned in the description, that you need UID to proceed to further implementation.
When we call accounts.register and get "Account Pending Verification" error/response, we receive also UID and a piece of the rest user information. If it is not enough we can add include parameter to the request and get more details. So even when you are getting such type of error you are getting user information and UID.

Or it doesn't work and get the same response in the scope of this hybris method?

krishnakumar_1712
Participant
0 Kudos

Hi Oleh,

Sorry, This Time I am not clear about your answer. How do i get UID if Error code is there.The method de.hybris.platform.gigya.gigyaservices.service.impl.DefaultGigyaService#callRawGigyaApiWithConfigAndObject throws an error if error code is not 0

olehi941
Active Participant

Hi Eldhos, maybe I was not clear enough.
I don't know how de.hybris.platform.gigya.gigyaservices.service.impl.DefaultGigyaService#callRawGigyaApiWithConfigAndObject behaves, so my comment was about native accounts.register REST API call.

So, when I am calling native accounts.register REST API -> I am getting user data.
But as I understood this method(you mentioned) behaves not as a native API and responds you only error without user UID and profile data, correct?