approveByEmail() not working

Hello,

These functions are not working anymore (both run in backend):

wix-users-backend.approveByEmail() //Deprecated
wix-members-backend.authentication.approveByEmail() //New one

The deprecated function “wixUsersBackend.approveByEmail()” was working fine since two days ago, but now with no modifications, the promise is always returning false and error object is an empty string array.

The new function “wixMembersBackendAuthentication.approveByEmail()” is returning false too and the error object is the following:
{“details”:{“applicationError”:{“description”:“Forbidden”,“code”:“FORBIDDEN”,“data”:{}}}}

Here the code used:

//New Function
import { authentication } from ‘wix-members-backend’;
export async function ApproveByEmail ( email ) {
return authentication . approveByEmail ( email )
. then (( sessionToken ) => {
return {
sessionToken : sessionToken ,
approved : true
};
})
. catch (( error ) => {
return {
approved : false ,
reason : error
};
});
}

//Old Function:
import wixUsersBackend from ‘wix-users-backend’;
export async function ApproveByEmail ( email ) {
return wixUsersBackend. approveByEmail ( email )
. then (( sessionToken ) => {
return { sessionToken , “approved” : true };
})
. catch (( error ) => {
return { “approved” : false , “reason” : error };
});
}

Could you let me know if there is any problem in the servers?

Thanks and regards
Enric

1 Like

Hello. If you believe you are experiencing a bug, you will want to submit this to customer care

Hi Amanda,

Thanks I submit it to customer care yesterday when you suggested it.
I hope they answer soon!

Thanks

Having the same issue, I don’t know how much time it’s like this - i guess aomething like a week, but i only noticed today :disappointed_relieved:

are you still having this issue? i have the same… i get “reason: forbidden” any time

Hi Shimi,

Yest it’s still happening as well as in the approveByToken functions, I submited a ticked 5 days ago, but I didn’t get a response from customer care yet… :disappointed_relieved:

Same for here. This is a Major API and has a BUG for over a week…

Hello,

Customer care just responded right now, told me that it should be fixed, I tested both functions (deprecated and new one) but it’s still throwing the same error.
I guess they’re working on that

Kind Regards

Hello,

We have had this problem for two weeks and customer care has not said anything else, except that it is fixed when it was not fixed… this bug is quite annoying because our customers can not register, we have to approve them through the wix interface and manually perform all the series of automations that are executed afterwards.

Do you have any news about this?

I do not, I am sorry. Unfortunately it must be resolved through customer care. I do realize problems like this take longer to resolve sometimes, but I would stay in the conversation wiht them. There is no customer support in this forum as it’s primary use is a space for community to help each other with code. I am sorry I do not have any more information currently.

Custome care only said me that “problem is solved” but it doesn’t, that was two weeks ago, should I sumbit another ticket??

Just to add to this, we’re getting the same error on approveByToken(). We’ve raised with Wix and it’s been passed to the development team, waiting to hear back.

Thank you for the update and for submitting the issue through support.

I have just logged a support ticket for this issue as I am seeing it too.

Still having this error (i’m using approveByEmail())
any luck with your site?

Still not working, I have a fallback to ApproveByToken, but both functions still throw the “forbidden” error

I heard back from support today:
“Our devs are aware of this and currently investigating.
We should have a fix for it sometime this week. We will reach out to you again when we have an update.”

I will post here again if/when I hear the problem is fixed.

Just heard from support again and tested and it now WORKS! Yay!