Authentication to use sharefile API without using redirect URL

We are currently attempting to connect to the ShareFile API from our application. However, we've encountered an issue to make API function without a redirect URL. Could you please provide the relevant documentation for this, and confirm whether our tenant/subscription includes API capabilities?


  • It depends on sign in policy e.g. username-password, SSO-SAML etc.

    For username-password, redirect can be by passed. You can make request to https://$hostname/oauth/token with params

    [

    'grant_type' => 'password',

    'client_id' => $client_id,

    'client_secret' => $client_secret,

    'username' => $username,

    'password' => $password,

    'expires_in' => EXPIRES_IN,

    ], to get the token.

     

    But for accounts with SAML, you will need to first authorize the user via https://secure.sharefile.com/oauth/authorize (this request requires redirecting once for the first time) get the code and then fetch the token by passing the code.

    Selected as Best