Approve By Token Forbidden

Hi,

I am working on a site which requires approval to sign up, however if an account is added by an admin, this can be bypassed. To do this, the account info is passed to the backend where ‘authentication.register’ is used to register the new account. I then though I should be able to use ‘approveByToken’ to approve the account immediately.

See the following:

    **const**  regResult  =  **await**  authentication . register ( email ,  pass , { 
        "contactInfo" : { 
            firstName :  firstname , 
            lastName :  lastname 
        } 
    }); 
    **const**  sesToken  =  **await**  authentication . approveByToken ( regResult.approvalToken ) 
    **return**  sesToken ; 

However when I do so the ‘approveByToken’ is returning a permission error saying it is ‘forbidden’:

message: ‘permission_denied, details: {}: Forbidden’
details:
applicationError:
description: Forbidden
code: FORBIDDEN
data: {}

Hello, there have been a few reports of this behavior. Please open a ticket with customer care so that all are accounted for and directed to the appropriate team. Thank you!