Jump to content
Welcome to our new Citrix community!
  • 0

Trying to Authenticate but I get a cors error

Oscar Asmat


I'm trying to authenticate with your api. When I try via postman everything is fine and I get an access token, but when I do it via my web app there is a cors failure.




I added the TrustedDomains with the patch method as per your documentation.




Afterwards I made a Get request to confirm the domains are there. 




I'm still getting the error.


I tried from all trustedDomains and they all fail.


here is my code 


export function authenticate(em, ps, sd, sf) {
    let data = {
        grant_type: sf.gt,
        client_id: sf.cid,
        client_secret: sf.css,
        username: em,
        password: ps

    return fetch('https://' + sd + '.sharefile.com/oauth/token', {
        method: 'POST',
        cache: 'no-cache',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        body: JSON.stringify(data)
    .then(res => res.json())
    .catch((res) => {

Please help!


Thank you,



Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...