OAuth 2.0 Authorization

OAuth 2.0 allows your app to request authorization to access documents and other information in a PDFfiller user’s account and to perform PDffiller operations on behalf of a user.

Step 1: Create Application

To start with OAuth 2.0 authorization flow, you need to register your application in PDFfiller API Settings. Upon registration, app is assigned a Client ID and Client Secret, which will be used to authorize against PDFfiller and to obtain authorization grant. Open My Apps section on PDFfiller Developers website and click 'CREATE NEW APP' button.

Fill the form and click CREATE APPLICATION button.

  • Name - name to identify your app
  • Description - a brief description of the app
  • OAuth callback Url - a callback URl where authorization grant will be returned after successful authentication

Note Client ID and Client Secret. You will use them later in your authentication process.

Step2: Obtain Authorization Code

From your app you need to redirect your user to:

https://developers.pdffiller.com/api_access?client_id=<client_id>&redirect_uri=<redirect_url>

Users will be asked to login to PDFfiller if needed. Following authorization dialog will be presented to user:

Once AUTHORIZE button is clicked, user is redirected to REDIRECT_URL from application setup with issued authorization_code:

https://REDIRECT_URL/?code=<authorization_code>&v=

Step3: Obtain Access Token

Now, you can use authorization token obtained in the Step2 to obtain your authorization grant

curl -X "POST" "https://api.pdffiller.com/v2/oauth/token" \
     -H "Content-Type: application/json; charset=utf-8" \
     -d "{
           \"grant_type\":\"authorization_code\",
           \"code\":\"<your code>\",
           \"client_id\":\"<your client id>\",
           \"client_secret\":\"<your client secret>\",
           \"redirect_uri\":\"http://example.com/token\"
         }"