Authorization

The token can be generated with the following API request.
Endpoint:https://<Base_URL>/oauth/token
Method: POST

The access token generated must be sent with the API requests in the authorization header.


API Contract

1. Generate Token

Description

Generate Auth Token

Owner

Talview

Method

POST

Endpoint

https://<Base_URL>/oauth/token

Request Schema:

Parameter

Type

Mandatory

Description

username

String

true

Username for the user to generate the token for.

password

String

true

Password of the user.

client_id

String

true

client Id for the token

client_secret

String

true

client secret for the token

Sample Request

{ 
 "username":"your_username",
  "password":"your_password",
  "client_id":"you_client_id",
  "client_secret":"your_client_secret" 
}
JavaScript


Sample Response

{  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.Jvcmdhbml6YXRp",  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoxMDk3LCJvcmdhbml6YXRpb25faWQiOjI3LCJmaXJzdF9uYW1lIjoicGl0c2NvIiwibWlkZGxlX25hbWUiOI6InN0YWdpbmciLCJ1c2VybmFtZSI6ImltcGxlbWVudGF0aW9uKzI3X3N0YWdpbmdAdGFsdmlldy5jb20iLCJwaG9uZSI6bnVsbCwiY291bnRyeV9jb2RlIjoiKzkxIiwiZW1haWwiOiJpbXBsZW1lbnRhdGlvbisyN19zdGFnaW5nQHRhbHZpZXcuY29tIiwiZXh0ZXJuYWxfaWQiOm51bGwsInN0YXR1cyI6ImFjdGl2ZSIsImlzX2RlbGV0ZWQiOmZhbHNlLCJmb3JjZV9jaGFuZ2VfcGFzc3dvcmQiOmZhbHNlfSwiaWF0IjoxNjExNzc3MDEyLCJleHAiOjE2MTE4MDU4MTJ90nWhEda6J3LSMuxo",
"grant_type": "Bearer",
"expires_in": 10800 
}
JavaScript


2. Steps to Upload the photo_id using identification end-point


Creates an Attendee


Endpoint:https://<Base_URL>/v1/attendee
Method: POST


Sample Request


{
  "first_name": "Jane",
  "middle_name": "Samuel",
  "last_name": "Doe",
  "email": "janedoe@talview.com",
  "external_attendee_id": "20001"
}


Sample Response


{
  "id": 456,
  "first_name": "Jane",
  "middle_name": "Samuel",
  "last_name": "Doe",
  "email": "janedoe@talview.com",
  "organization_id": 34,
  "external_attendee_id": "20001"
}

Operations to upload the attendee identification data

 

Endpoint:https://<Base_URL>/v1/Identification
Method: POST


{
  "type": "type of identification",
  "file": "candidate photo to be uploaded",
  "attendee_id": "Unique identifier for the attendee"
}


Sample Response

    

Http Response code: 201

Response: A successful post request registers the identification record.