Criar um link de conexão para um cliente
curl --request POST \
--url https://cloud.watahub.dev/v1/customers/{customerId}/setup-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowedOrigins": [
"<string>"
],
"successRedirectUrl": "<string>",
"failureRedirectUrl": "<string>",
"allowedConnectionTypes": [
"dedicated",
"coexistence"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowedOrigins: ['<string>'],
successRedirectUrl: '<string>',
failureRedirectUrl: '<string>',
allowedConnectionTypes: ['dedicated', 'coexistence']
})
};
fetch('https://cloud.watahub.dev/v1/customers/{customerId}/setup-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloud.watahub.dev/v1/customers/{customerId}/setup-links"
payload = {
"allowedOrigins": ["<string>"],
"successRedirectUrl": "<string>",
"failureRedirectUrl": "<string>",
"allowedConnectionTypes": ["dedicated", "coexistence"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"url": "<string>",
"token": "<string>",
"expiresAt": 123,
"customerId": "<string>",
"allowedConnectionTypes": [
"dedicated"
],
"successRedirectUrl": "<string>",
"failureRedirectUrl": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Referência da API
Criar um link de conexão para um cliente
Criar um link de conexão para um cliente
POST
/
v1
/
customers
/
{customerId}
/
setup-links
Criar um link de conexão para um cliente
curl --request POST \
--url https://cloud.watahub.dev/v1/customers/{customerId}/setup-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowedOrigins": [
"<string>"
],
"successRedirectUrl": "<string>",
"failureRedirectUrl": "<string>",
"allowedConnectionTypes": [
"dedicated",
"coexistence"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowedOrigins: ['<string>'],
successRedirectUrl: '<string>',
failureRedirectUrl: '<string>',
allowedConnectionTypes: ['dedicated', 'coexistence']
})
};
fetch('https://cloud.watahub.dev/v1/customers/{customerId}/setup-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloud.watahub.dev/v1/customers/{customerId}/setup-links"
payload = {
"allowedOrigins": ["<string>"],
"successRedirectUrl": "<string>",
"failureRedirectUrl": "<string>",
"allowedConnectionTypes": ["dedicated", "coexistence"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"url": "<string>",
"token": "<string>",
"expiresAt": 123,
"customerId": "<string>",
"allowedConnectionTypes": [
"dedicated"
],
"successRedirectUrl": "<string>",
"failureRedirectUrl": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Autorizações
bearerApiKeyheaderApiKey
Chave de API da conta.
Parâmetros de caminho
Corpo
application/json
Required array length:
1 - 8 elementsOrigem HTTPS exata, por exemplo https://app.example.com
Maximum string length:
200URL HTTPS em um dos allowedOrigins.
Maximum string length:
2000Maximum string length:
2000Required array length:
1 - 2 elementsOpções disponíveis:
dedicated, coexistence Resposta
Link de conexão.
Página hospedada do Embedded Signup /connect/{token}. Uso único; expira em 1 hora.
Milissegundos desde Unix epoch.
Opções disponíveis:
dedicated, coexistence Esta página foi útil?