1.1.0 • Published 3 years ago

kyc-js-sdk v1.1.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
3 years ago

MobID KYC JS SDK

MobidKycApi - JavaScript client for MobID KYC API API for MOBID KYC APP This SDK is generated by the Swagger Codegen project:

  • API version: v1.1
  • Package version: v1.1

Installation

npm

npm install mobid_kyc_api --save

Getting Started

Example SDK usage:

var MobidKycApi = require('mobid_kyc_api');

var defaultClient = MobidKycApi.ApiClient.instance;

// Set the API host, default is http://127.0.0.1:8000
defaultClient.basePath = 'https://api.mobid.ai'


const getBearerTokenAndCallAPI = (ApiClient) => {
  let auth = new MobidKycApi.ApiTokenAuthApi(defaultClient)

  const authData = {
    username: 'CLIENT_ID',
    password: 'CLIENT_SECRET'
  }
  const authCallback = function(error, data, response) {
    if (error) {
      console.error(error);
      return null;
    } else {
      console.log('API called successfully. Returned token: ' + data.token);

      let apiKey = data.token;

      callAPI(apiKey);
    }
  };
  auth.apiTokenAuthCreate(authData, authCallback)

}

  const callAPI = (apiKey) => {


  // Configure API key authorization: Bearer
  let Bearer = defaultClient.authentications['Bearer'];
  Bearer.name = 'Authorization'
  Bearer.apiKey = apiKey
  // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
  Bearer.apiKeyPrefix = "Bearer"

  let api = new MobidKycApi.ApiApi()

  let data = new MobidKycApi.ConferenceUpdate(); // {ConferenceUpdate}
  data.verification = 'verification UUID'

  const callback = function(error, data, response) {
    if (error) {
      console.error(error);
    } else {
      console.log('API called successfully. Returned data: ' + data);
    }
  };
  api.apiV11ConferencesCreate(data, callback);
}


getBearerTokenAndCallAPI(defaultClient)

w

Documentation for API Endpoints

All URIs are relative to http://127.0.0.1:8000

ClassMethodHTTP requestDescription
MobidKycApi.ApiApiapiV11ConferencesCreatePOST /api/v1.1/conferences/
MobidKycApi.ApiApiapiV11ConferencesListGET /api/v1.1/conferences/
MobidKycApi.ApiApiapiV11ConferencesPartialUpdatePATCH /api/v1.1/conferences/{conference_id}/
MobidKycApi.ApiApiapiV11ConferencesReadGET /api/v1.1/conferences/{conference_id}/
MobidKycApi.ApiApiapiV11ConferencesUpdatePUT /api/v1.1/conferences/{conference_id}/
MobidKycApi.ApiApiapiV11ImagesCreatePOST /api/v1.1/images/
MobidKycApi.ApiApiapiV11ImagesListGET /api/v1.1/images/
MobidKycApi.ApiApiapiV11ImagesPartialUpdatePATCH /api/v1.1/images/{image_id}/
MobidKycApi.ApiApiapiV11ImagesReadGET /api/v1.1/images/{image_id}/
MobidKycApi.ApiApiapiV11ImagesUpdatePUT /api/v1.1/images/{image_id}/
MobidKycApi.ApiApiapiV11VerificationsCreatePOST /api/v1.1/verifications/
MobidKycApi.ApiApiapiV11VerificationsImagesCreatePOST /api/v1.1/verifications/{verification_id}/images/
MobidKycApi.ApiApiapiV11VerificationsImagesListGET /api/v1.1/verifications/{verification_id}/images/
MobidKycApi.ApiApiapiV11VerificationsImagesPartialUpdatePATCH /api/v1.1/verifications/{verification_id}/images/{image_id}/
MobidKycApi.ApiApiapiV11VerificationsImagesReadGET /api/v1.1/verifications/{verification_id}/images/{image_id}/
MobidKycApi.ApiApiapiV11VerificationsImagesUpdatePUT /api/v1.1/verifications/{verification_id}/images/{image_id}/
MobidKycApi.ApiApiapiV11VerificationsListGET /api/v1.1/verifications/
MobidKycApi.ApiApiapiV11VerificationsPartialUpdatePATCH /api/v1.1/verifications/{verification_id}/
MobidKycApi.ApiApiapiV11VerificationsReadGET /api/v1.1/verifications/{verification_id}/
MobidKycApi.ApiApiapiV11VerificationsUpdatePUT /api/v1.1/verifications/{verification_id}/
MobidKycApi.ApiTokenAuthApiapiTokenAuthCreatePOST /api-token-auth/API View that receives a POST with a user's username and password.
MobidKycApi.ApiTokenRefreshApiapiTokenRefreshCreatePOST /api-token-refresh/API View that returns a refreshed token (with new expiration) based on existing token
MobidKycApi.ApiTokenVerifyApiapiTokenVerifyCreatePOST /api-token-verify/

Documentation for Models

Documentation for Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header