IntroductionBefore you beginTerminologyGetting started
Authorization
IntroductionOAuth 2.0AutonomousPinRequest a pinRequest a delegation token
Accounts
Entities
User accounts
GroupsFilesFoldersTemplatesEmail templatesAppsErrors

Pin based authentication

Using this technique, the user inputs a PIN code into your application using an out-of-band technique.

Typically, the user is presented with the PIN from the SmartVault web server and performs a copy and paste operation to put the PIN into your application. Your application exchanges the PIN code for an access token.

Pin numbers are specific to each application authorized by each user.



Request a pin

For each user who uses your application, you will need to have SmartVault generate a pin for your user.

The pin is used to authenticate each API call, and only needs to be generated once for each user.

The pin is not directly returned to your application. Instead, you will get a unique URL that the user will need to visit in order to authorize your application in SmartVault. The user will be given their pin number, which they will need to enter into your application so you can authenticate with SmartVault.


This call is used to request a pin from SmartVault. It returns a URL for the user to visit to authorize the request and retrieve their pin.

Request pin
POST/pin/end


Body parameters


client_idstringThe client ID as registered in SmartVault.
{
"client_id": "SampleCRMWeb"
}

Request


Headers:
Content-Type:application/json
Accept:application/json
Body:
{
"client_id": "SampleCRMWeb"
}

Response


Returns the authorization uri.

Show success object


Will return an error object if the client id is not specified in the request body.







Request a delegation token

If you are using pin-based authentication, you will need the user's pin in order to get a delegation token.

No "Authorization" header is required.

This call is used to request a delegation token. This is the token you will use to authenticate each time your application makes a call to the API.

Request delegation token
POST/pin/auth


Body parameters


user_emailstringThe user account's email address.
client_idstringThe client ID as registered in SmartVault.
pinstring (optional)The pin number assigned to the email and client ID. This is used only for pin-based authentication.
{
"user_email": "testuser@smartvault.com",
"pin_info": {
"client_id": "SampleCRMWeb",
"pin": 341450484
}
}

Request


Headers:
Content-Type:application/json
Accept:application/json
Body:
{
"user_email": "testuser@smartvault.com",
"pin_info": {
"client_id": "SampleCRMWeb",
"pin": 341450484
}
}

Response


Returns the delegation token, its expiracy and the id related to the user used for retrieving it.

Show success object


Will return an error object if any parameters are missing.