Skip to content

Latest commit

 

History

History
219 lines (166 loc) · 11.7 KB

AuthorizationApi.md

File metadata and controls

219 lines (166 loc) · 11.7 KB

AuthorizationApi

All URIs are relative to https://api.frame.io

Method HTTP request Description
authDeviceConfirmDevice GET /v2/auth/token Polling for Device Authorization
authDeviceRefreshToken POST /v2/auth/token Refresh Device Token
authDeviceRevokeToken POST /v2/auth/revoke Revoke Device Authorization
deviceRequestCode POST /v2/device/code Request device code

authDeviceConfirmDevice

AuthDeviceConfirmDevice200Response authDeviceConfirmDevice(grantType, clientId, deviceCode, xClientVersion)

Polling for Device Authorization

Once we have handed the pairing code to the user, we need to check and see if they've entered it. To do so, we can make the following request.

Example

// Import classes:
//import dev.androidbroadcast.framesdk.infrastructure.*
//import dev.androidbroadcast.framesdk.models.*

val apiInstance = AuthorizationApi()
val grantType : kotlin.String = grantType_example // kotlin.String | The type of authorization grant our OAuth system is issuing.
val clientId : kotlin.String = clientId_example // kotlin.String | The unique device id, such as the device serial number. Must be the same as the client id used on the initiation request.
val deviceCode : kotlin.String = deviceCode_example // kotlin.String | The unique `device_code` generated by the server for this authorization attempt. Returned from the initiation request.
val xClientVersion : kotlin.String = 2.16.4 // kotlin.String | Firmware or software version of a C2C integration. Will be used to determine the correct Device Model configuration for the device when multiple are available. Must be a valid semantic version.    For more on semantic versions, see here: https://semver.org/
try {
    val result : AuthDeviceConfirmDevice200Response = apiInstance.authDeviceConfirmDevice(grantType, clientId, deviceCode, xClientVersion)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AuthorizationApi#authDeviceConfirmDevice")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AuthorizationApi#authDeviceConfirmDevice")
    e.printStackTrace()
}

Parameters

| grantType | kotlin.String| The type of authorization grant our OAuth system is issuing. | [enum: urn:ietf:params:oauth:grant-type:device_code] | | clientId | kotlin.String| The unique device id, such as the device serial number. Must be the same as the client id used on the initiation request. | | | deviceCode | kotlin.String| The unique `device_code` generated by the server for this authorization attempt. Returned from the initiation request. | |

Name Type Description Notes
xClientVersion kotlin.String Firmware or software version of a C2C integration. Will be used to determine the correct Device Model configuration for the device when multiple are available. Must be a valid semantic version. For more on semantic versions, see here: https://semver.org/ [optional] [default to "0.0.0"]

Return type

AuthDeviceConfirmDevice200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

authDeviceRefreshToken

authDeviceRefreshToken(clientId, clientSecret, grantType, refreshTokem)

Refresh Device Token

Refresh your devices token

Example

// Import classes:
//import dev.androidbroadcast.framesdk.infrastructure.*
//import dev.androidbroadcast.framesdk.models.*

val apiInstance = AuthorizationApi()
val clientId : kotlin.String = clientId_example // kotlin.String | Must be a unique identifier per hardware device, such as a unique hardware serial number. Must be the same as the client id used on initial authorization.
val clientSecret : kotlin.String = clientSecret_example // kotlin.String | A static string, provided by Frame.io to be embedded for a device manufacturer/model. Acts as an identifier within Frame.io.
val grantType : kotlin.String = grantType_example // kotlin.String | Grant type
val refreshTokem : kotlin.String = refreshTokem_example // kotlin.String | A valid `refresh_token`, from a previous authorization. Refresh tokens are valid for 14 days from issuance. This is received after the initial authorization and will receive a new `refresh-token` after every refresh.
try {
    apiInstance.authDeviceRefreshToken(clientId, clientSecret, grantType, refreshTokem)
} catch (e: ClientException) {
    println("4xx response calling AuthorizationApi#authDeviceRefreshToken")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AuthorizationApi#authDeviceRefreshToken")
    e.printStackTrace()
}

Parameters

| clientId | kotlin.String| Must be a unique identifier per hardware device, such as a unique hardware serial number. Must be the same as the client id used on initial authorization. | | | clientSecret | kotlin.String| A static string, provided by Frame.io to be embedded for a device manufacturer/model. Acts as an identifier within Frame.io. | | | grantType | kotlin.String| Grant type | [enum: refresh_token] |

Name Type Description Notes
refreshTokem kotlin.String A valid `refresh_token`, from a previous authorization. Refresh tokens are valid for 14 days from issuance. This is received after the initial authorization and will receive a new `refresh-token` after every refresh.

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

authDeviceRevokeToken

kotlin.String authDeviceRevokeToken(xClientVersion, clientId, clientSecret, token)

Revoke Device Authorization

Revoke device authorization

Example

// Import classes:
//import dev.androidbroadcast.framesdk.infrastructure.*
//import dev.androidbroadcast.framesdk.models.*

val apiInstance = AuthorizationApi()
val xClientVersion : kotlin.String = 2.16.4 // kotlin.String | Firmware or software version of a C2C integration. Will be used to determine the correct Device Model configuration for the device when multiple are available. Must be a valid semantic version.    For more on semantic versions, see here: https://semver.org/
val clientId : kotlin.String = clientId_example // kotlin.String | Must be a unique identifier per hardware device, such as a unique hardware serial number. Must be the same `client_id` used on initial authorization.
val clientSecret : kotlin.String = clientSecret_example // kotlin.String | A static string, provided by Frame.io to be embedded for a device manufacturer/model. Acts as an identifier within Frame.io.
val token : kotlin.String = token_example // kotlin.String | 
try {
    val result : kotlin.String = apiInstance.authDeviceRevokeToken(xClientVersion, clientId, clientSecret, token)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AuthorizationApi#authDeviceRevokeToken")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AuthorizationApi#authDeviceRevokeToken")
    e.printStackTrace()
}

Parameters

| xClientVersion | kotlin.String| Firmware or software version of a C2C integration. Will be used to determine the correct Device Model configuration for the device when multiple are available. Must be a valid semantic version. For more on semantic versions, see here: https://semver.org/ | [optional] [default to "0.0.0"] | | clientId | kotlin.String| Must be a unique identifier per hardware device, such as a unique hardware serial number. Must be the same `client_id` used on initial authorization. | [optional] | | clientSecret | kotlin.String| A static string, provided by Frame.io to be embedded for a device manufacturer/model. Acts as an identifier within Frame.io. | [optional] |

Name Type Description Notes
token kotlin.String [optional]

Return type

kotlin.String

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

deviceRequestCode

DeviceRequestCode200Response deviceRequestCode(clientId, clientSecret, scope, xClientVersion)

Request device code

Example

// Import classes:
//import dev.androidbroadcast.framesdk.infrastructure.*
//import dev.androidbroadcast.framesdk.models.*

val apiInstance = AuthorizationApi()
val clientId : kotlin.String = clientId_example // kotlin.String | A unique identifier for the physical hardware device. This value needs to be guaranteed to be unique for the device. This could be a serial number or a randomly generated UUID.
val clientSecret : kotlin.String = clientSecret_example // kotlin.String | This will be issued to you by Frame.io support and identifies the your device model. This value should be kept secret from the user, and should be encrypted at rest
val scope : kotlin.String = scope_example // kotlin.String | The permissions we are requesting, with spaces used as delimiters. Hardware devices can only request the following two scopes
val xClientVersion : kotlin.String = 2.16.4 // kotlin.String | Firmware or software version of a C2C integration. Will be used to determine the correct Device Model configuration for the device when multiple are available. Must be a valid semantic version.    For more on semantic versions, see here: https://semver.org/
try {
    val result : DeviceRequestCode200Response = apiInstance.deviceRequestCode(clientId, clientSecret, scope, xClientVersion)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AuthorizationApi#deviceRequestCode")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AuthorizationApi#deviceRequestCode")
    e.printStackTrace()
}

Parameters

| clientId | kotlin.String| A unique identifier for the physical hardware device. This value needs to be guaranteed to be unique for the device. This could be a serial number or a randomly generated UUID. | | | clientSecret | kotlin.String| This will be issued to you by Frame.io support and identifies the your device model. This value should be kept secret from the user, and should be encrypted at rest | | | scope | kotlin.String| The permissions we are requesting, with spaces used as delimiters. Hardware devices can only request the following two scopes | [enum: asset_create, offline] |

Name Type Description Notes
xClientVersion kotlin.String Firmware or software version of a C2C integration. Will be used to determine the correct Device Model configuration for the device when multiple are available. Must be a valid semantic version. For more on semantic versions, see here: https://semver.org/ [optional] [default to "0.0.0"]

Return type

DeviceRequestCode200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json