Skip to content

ERROR {"status": 403, "text": "API calls are disabled for non-browser applications"}  #4

@shadow-monarch08

Description

@shadow-monarch08

I was trying to send email through my react native app and every time this error was poping up. I copied the code from the official doc.
Below is the code I am using :

const Verify = async () => {
if (!form.username || !form.email || !form.password) {
Alert.alert('Error', 'Please enter all the fields')
return
}
setIsSubmitting(true);
try {

  await send(
    'service_id',
    'template_id',
    {
      to_name: form.username,
      to_email: form.email,
      verification_code: '9999',
    },
    {
      publicKey: 'your_publicKey',
    },
  );

  console.log('SUCCESS!');
  router.push('/verification');
  
} catch (err) {
  if (err instanceof EmailJSResponseStatus) {
    console.log('EmailJS Request Failed...', err);
  }

  console.log('ERROR', err);
} finally {
  setIsSubmitting(false);
}

};

I would appriciate if someone would review the code and figure out the problem.
Thanks for the help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions