Skip to content

Latest commit

 

History

History
114 lines (76 loc) · 2.86 KB

AuthorizationTokensApi.md

File metadata and controls

114 lines (76 loc) · 2.86 KB

Flipdish.AuthorizationTokensApi

All URIs are relative to https://api.flipdish.co

Method HTTP request Description
getAuthorizationTokens GET /api/v1.0/{appId}/authorizationtokens/{oauthAppId}
revokeToken DELETE /api/v1.0/{appId}/authorizationtokens/{key}

getAuthorizationTokens

RestApiPaginationResultOAuthTokenModel getAuthorizationTokens(oauthAppId, appId, opts)

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.AuthorizationTokensApi();
let oauthAppId = "oauthAppId_example"; // String | 
let appId = "appId_example"; // String | 
let opts = {
  'page': 56, // Number | 
  'limit': 56 // Number | 
};
apiInstance.getAuthorizationTokens(oauthAppId, appId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
oauthAppId String
appId String
page Number [optional]
limit Number [optional]

Return type

RestApiPaginationResultOAuthTokenModel

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data, Message, ErrorCode, StackTrace

revokeToken

revokeToken(key, appId)

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.AuthorizationTokensApi();
let key = "key_example"; // String | 
let appId = "appId_example"; // String | 
apiInstance.revokeToken(key, appId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
key String
appId String

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Message, ErrorCode, StackTrace