{ "opencollection": "1.0.0", "info": { "name": "Pipedrive API v1 Activities Oauth API", "version": "1.0.0" }, "items": [ { "info": { "name": "Oauth", "type": "folder" }, "items": [ { "info": { "name": "Requesting authorization", "type": "http" }, "http": { "method": "GET", "url": "https://api.pipedrive.com/v1/oauth/authorize", "params": [ { "name": "client_id", "value": "", "type": "query", "description": "The client ID provided to you by the Pipedrive Marketplace when you register your app" }, { "name": "redirect_uri", "value": "", "type": "query", "description": "The callback URL you provided when you registered your app. Authorization code will be sent to that URL (if it matches with the value you entered in the registration form) if a user approves the app install. Or, if a customer declines, the corresponding error will also be sent to this URL." }, { "name": "state", "value": "", "type": "query", "description": "You may pass any random string as the state parameter and the same string will be returned to your app after a user authorizes access. It may be used to store the user's session ID from your app or distinguish different responses. Using state may increase security; see RFC-6749.\n" } ] }, "docs": "Authorize a user by redirecting them to the Pipedrive OAuth authorization page and request their permissions to act on their behalf. This step is necessary to implement only when you allow app installation outside of the Marketplace." }, { "info": { "name": "Getting the tokens", "type": "http" }, "http": { "method": "POST", "url": "https://api.pipedrive.com/v1/oauth/token", "headers": [ { "name": "Authorization", "value": "" } ], "body": { "type": "form-urlencoded", "data": [ { "name": "grant_type", "value": "" }, { "name": "code", "value": "" }, { "name": "redirect_uri", "value": "" } ] }, "auth": { "type": "basic", "username": "{{username}}", "password": "{{password}}" } }, "docs": "After the customer has confirmed the app installation, you will need to exchange the `authorization_code` to a pair of access and refresh tokens. Using an access token, you can access the user's data through the API." }, { "info": { "name": "Refreshing the tokens", "type": "http" }, "http": { "method": "POST", "url": "https://api.pipedrive.com/v1/oauth/token/", "headers": [ { "name": "Authorization", "value": "" } ], "body": { "type": "form-urlencoded", "data": [ { "name": "grant_type", "value": "" }, { "name": "refresh_token", "value": "" } ] }, "auth": { "type": "basic", "username": "{{username}}", "password": "{{password}}" } }, "docs": "The `access_token` has a lifetime. After a period of time, which was returned to you in `expires_in` JSON property, the `access_token` will be invalid, and you can no longer use it to get data from our API. To refresh the `access_token`, you must use the `refresh_token`." } ] } ], "bundled": true }