OAuth 2
Endpoints
Generate access token
Parameters
-
username required if grant type: passwordUser's email address.
-
password required if grant type: passwordUser's password.
-
grant_type requiredCan be password, refresh_token, authorization_code.
-
scope optionalSpecifies what access this user gets. Default value “*” - all endpoints are available.
-
refresh_token required if grant_type: refresh_tokenThe token that refreshes the user's access.
-
code required if grant type: authorization_codeAuthorization code that allows third-party applications to provide access to signNow.
-
expiration_time optionalThe amount of time till the token expires in seconds.
Returns
- “invalid_client” - incorrect basic auth token
- “invalid_request” - request without a required parameter
- “invalid_scope” - invalid scope
- “Invalid credentials.” - either incorrect password or non-existing email provided
POST /oauth2/token
curl
-X POST
\
https://api-eval.signnow.com/oauth2/token
\
-H
'Authorization:
Basic 'Authorization: Basic {{basic_authorization_token}}'
\
-H
'content-type:
multipart/form-data;'
\
-F
'username=
user@email.com'
\
-F
'password=
{{password}}'
\
-F
'grant_type=
password'\
\
-F
'scope=
*'
Response
{
"expires_in": 2592000,
"token_type": "bearer",
"access_token": "7cfe4b0fecbfaa0b4781c30262f0bf3f68b9b6ca5d11270fd83a091e968042d9",
"refresh_token": "59889bcbced82d5c2ba1bc7d0f634f30521e3d47b7f96221a2d8618a30175a16",
"scope": "*",
"last_login": 1
}
Verify access token
No parameters required.
Returns
GET /oauth2/token
curl
-X GET
\
https://api-eval.signnow.com/oauth2/token
\
-H
'Authorization:
Basic {{basic}}'
\
-H
'Content-Type:
application/json'
Response
{
"access_token": "8d83aed6d902c396e2a45d73eb0f5e41cfa11caa726e621247dc15c46d5fb112",
"scope": "*",
"expires_in": "2517898",
"token_type": "bearer"
}