Create a Forms App
formsAppsSDK.createFormsApp(formsApp).then((savedFormsApp) => {
// Use Forms App here...
})
Forms App properties
Create a Forms App User
formsAppsSDK.createUser(formsAppUser).then((savedFormsAppUser) => {
// Use Forms App User here...
})
Forms App User
Delete a Forms App by its identifier
const formsAppId = 1
formsAppsSDK.deleteFormsApp(formsAppId).then(() => {
// Forms App has been deleted...
})
The exact identifier of the Forms App you wish to delete
Remove a custom sending address for a forms app
const formsAppId = 1
await formsAppsSDK.deleteSendingAddress(formsAppId)
The ID of the forms app you wish to remove the sending address from
Delete a Forms App User by its identifier
const formsAppUserId = 1
formsAppsSDK.deleteUser(formsAppUserId).then(() => {
// Forms App User has been deleted...
})
The exact Forms App User identifier you wish to delete
Get a single Forms App by its identifier
const formsAppId = 1
formsAppsSDK.getFormsApp(formsAppId).then((formsApp) => {
// Use Forms App here...
})
The exact identifier of the Forms App you wish to get
Get a single Forms App for the Bearer token of a Forms App User
const bearerToken = ''
formsAppsSDK.getMyFormsApp(bearerToken).then((formsApp) => {
// Use Forms App here...
})
Optional
formsAppUserToken: unknownThe Bearer token in the Authorization
header
from a request from an App User
Get the email address forms app emails will be sent from
const res = await formsAppsSDK.getSendingAddress(formsAppId)
The ID of the forms app you wish to get the sending address for
Set the email address forms app emails will be sent from
const res = await formsAppsSDK.setSendingAddress(
formsAppId,
sendingAddressConfig,
)
The ID of the forms app you wish to set the sending address for
The object containing the emailAddress
&
emailName
properties
Optional
emailUpdate styles for Forms App
formsAppsSDK.updateStyles(formsAppId, styles).then(() => {
// Styles have been updated...
})
The exact identifier of the Forms App you wish to update the styles
Forms App styles properties
Static
verifyJWTA Static function to verify a JWT and return its result
const token =
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
// or
const token =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c'
OneBlink.FormsApps.verifyJWT(token)
.then((result) => {
// Result is Decoded Token
})
.catch((e) => {
// Token was invalid
})
The JWT you wish to verify
Example