This repository shows how to read bulk sensitive data within an Asynchronous Reactor, while preventing going over Rate Limits.
Create a new Management Application with full application
and reactor
permissions.
Paste the API key to a new terraform.tfvars
file at this repository root:
management_api_key = "key_W8wA8CmcbwXxJsomxeWHVy"
Initialize Terraform:
terraform init
And run Terraform to provision all the required resources:
terraform apply
Using the reactor_id
and reactor_api_key
generated as a Terraform state outputs, make the following request:
curl -L -X POST 'https://api-dev.basistheory.com/reactors/{{reactor_id}}/react' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'BT-API-KEY: {{invoker_api_key}}' \
--data-raw '{
"args": {
"tokenIds": ["6439b6be-82b3-4b0b-a6d2-597843bfc617"]
},
"callback_url": "https://boxay5ij3yzwx2l.m.pipedream.net",
"timeout_ms": 120000
}'
Make sure to replace the variables above with the Terraform outputs stored in Terraform state.
Parameter | Description |
---|---|
args.tokenIds |
The tokens (id) to detokenize |
callback_url |
A webhook to call with the results of the Reactor run |
timeout_ms |
Timeout for the Reactor function to run |
The callback_url
will be called with the contents returned by the Reactor function.