UserClouds logo
Tokenizer/Tokens/Actions

Lookup Or Create Tokens

This endpoint helps you re-use existing tokens by only creating new tokens when they don't exist already.

POST
/tokenizer/tokens/actions/lookuporcreate
access_policy_rids?array<object>
data?array<string>
transformer_rids?array<object>

Response Body

curl -X POST "https://your-tenant-name.tenant.userclouds.com/tokenizer/tokens/actions/lookuporcreate" \
  -H "Content-Type: application/json" \
  -d '{}'
const body = JSON.stringify({})

fetch("https://your-tenant-name.tenant.userclouds.com/tokenizer/tokens/actions/lookuporcreate", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://your-tenant-name.tenant.userclouds.com/tokenizer/tokens/actions/lookuporcreate"
  body := strings.NewReader(`{}`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://your-tenant-name.tenant.userclouds.com/tokenizer/tokens/actions/lookuporcreate"
body = {}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "tokens": [
    "string"
  ]
}
Empty
Empty
Empty
Empty