🔑OAuth Token


All Valify Service APIs use standard OAuth 2.0 as an authentication mechanism. An access token expires after 10 minutes of generation by default and can be used for a limited number of trials for each service API, depending on the bundle.

To generate an access token, you need to call the following API using the credentials provided to you by Valify as follows:

OAuth Token

POST https://valifystage.com/api/o/token/

Headers

Name
Type
Description

Content-Type

string

application/x-www-form-urlencoded

Request Body

Name
Type
Description

username

string

password

string

client_id

string

client_secret

string

grant_type

string

password

{
    'access_token': '********************************', 
    'expires_in': 600, #10 Minutes
    'token_type': 'Bearer', 
    'scope': '<given_score_permission>', 
    'refresh_token': '********************************'
}
import requests

r = requests.post("https://valifystage.com/api/o/token/",
        data={
            'username': '<username>', # Place your data here
            'password': '<password>', 
            'client_id': '<client id>',  
            'client_secret': '<client secret>', 
            'grant_type': 'password'
        }
    )

print(r.json())

Postman Package

Last updated