Test the SDK by adding VAULT-ID, VAULT-URL, and SERVICE-ACCOUNT details in the required places for each sample.
- A Skylow account. If you don't have one, register for one on the Try Skyflow page.
- Node 7.6.0 and above.
- Install the Node SDK:
npm install skyflow-node- In a browser, navigate to Skyflow Studio.
- Create a vault by clicking Create Vault > Start With a Template > Quickstart vault.
- Once the vault is created, click the gear icon and select Edit Vault Details.
- Note your Vault URL and Vault ID values, then click Cancel. You'll need these later.
- In the side navigation click, IAM > Service Accounts > New Service Account.
- For Name, enter "SDK Samples". For Roles, choose Vault Editor.
- Click Create. Your browser downloads a credentials.json file. Keep this file secure. You'll need it for each of the samples.
Detokenize a data token from the vault. Make sure the specified token is for data that exists in the vault. If you need a valid token, use Insert.ts to insert the data, then use this data's token for detokenization.
- Replace <VAULT_ID> with VAULT ID
- Replace <VAULT_URL> with VAULT URL.
- Replace <FIELD_NAME> with COLUMN NAME.
- Replace with Data Token 1.
- Replace with Data Token 2.
- Replace with Data Token 3.
- Replace with Data Token 4.
- Replace <YOUR_CREDENTIAL_FILE> with relative path of SERVICE ACCOUNT CREDENTIAL FILE.
ts-node Detokenize.tsGet data using skyflow id.
- Replace <VAULT_ID> with VAULT ID
- Replace <VAULT_URL> with VAULT URL.
- Replace with Skyflow Id 1.
- Replace with Skyflow Id 2.
- Replace with Skyflow Id 3.
- Replace <YOUR_CREDENTIAL_FILE> with relative path of SERVICE ACCOUNT CREDENTIAL FILE.
- Replace <TABLE_NAME> with credit_cards.
ts-node GetById.tsInsert data in the vault.
- Replace <VAULT_ID> with VAULT ID.
- Replace <VAULT_URL> with VAULT URL.
- Replace <YOUR_CREDENTIAL_FILE> with relative path of SERVICE ACCOUNT CREDENTIAL FILE.
- Replace <TABLE_NAME> with credit_cards.
- Replace <FIELD_NAME> with column name.
- Replace with valid value corresponding to column name.
ts-node Insert.tsSkyflow Connections is a gateway service that uses Skyflow's underlying tokenization capabilities to securely connect to first-party and third-party services. This way, your infrastructure is never directly exposed to sensitive data, and you offload security and compliance requirements to Skyflow.
- Replace <VAULT_ID> with VAULT ID.
- Replace <VAULT_URL> with VAULT URL.
- Replace <YOUR_CREDENTIAL_FILE> with relative path of SERVICE ACCOUNT CREDENTIAL FILE.
- Replace <CONNECTION_URL> with Connection url.
- Give Authorization value as the tokens.
- Replace value of requestBody with your's request body content.
ts-node InvokeConnection.tsGenerates a service account Bearer token using the file path of credentials.json.
- Replace <YOUR_CREDENTIAL_FILE_PATH> with relative path of SERVICE ACCOUNT CREDENTIAL FILE.
ts-node TokenGenerationExample.tsGenerates a service account bearer token using the JSON content of a credentials file.
- Replace credentials* with json data of downloaded credentials file while creation Service account.
ts-node TokenGenerationUsingCredContent.ts