Generating an Access Token
PactSafe uses OAuth 2 for all API authentication. Authenticating to the API requires an Access Token. Ready to start using the PactSafe API? Read below for directions on generating an Access Token.
Go to User Profile
In order to get your access token, you'll need an account with API access. Once you have that, just log in and go to your user's profile to create a new app.
 to create a new Developer App. Then getting your access token is easy!](https://files.readme.io/9e6489b-CloudApp_Annotation_2017-11-03_at_12.19.24_AM.png.png)
Go to your profile to create a new Developer App. Then getting your access token is easy!
Create a new Developer App
Create a new Developer App with a name — don't worry about a callback URL or anything like that. You'll only need that if you're creating an app that uses PactSafe's OAuth 2.0 authentication experience. Questions on that? Email [email protected].
Generate an Access Token
After creating your app, click into your freshly created app. You'll be prompted to enter your password (for security reasons), and then you'll see a screen where you can create a new Access Token:
Important: Every REST API call you make to PactSafe must have the header 'Authorization Bearer {access_token}' in order to get you the data you need.
Once you've generated the token, you can copy it to your clipboard. From there, you can start making API calls! A great example would be...
HTTP GET https://api.pactsafe.com/v1.1/sites/1/requests
Authorization: Bearer {access_token}
Content-type: application/json
Access Token Scoping
When generating an Access Token, the Access Token will be scoped to the PactSafe User Account that created the token and also has access to the same PactSafe Sites that the User Account is added to.
Dedicated PactSafe Site Scoping
In some situations, you may want to have a dedicated user added to a PactSafe Site that is only used for generating the access token and has access to only one site. This can allow for greater separation of environments, which may be helpful when you use PactSafe Sites in combination with different development environments (Prod, Dev, etc).
Updated 3 months ago
What's Next
Now that you've got your access token for the REST API, you can do all sorts of stuff. Try getting started by creating a new Request for signature.
Creating Signature Requests |