Check for a valid subdomain link¶
Verifies if the given subdomain (affiliate link) is attributed to an organization.
Note: This query performs a case-insensitive but exact
match.
Authentication Required
Requires CAN_QUERY_AFFILIATE_LINKS
permission.
-
Arguments
subdomain
:String!
-
Returns
Example¶
const axios = require("axios")
// const apiUrl = "https://api.oeus-kraken.energy/v1/graphql/" // Prod
const apiUrl = "https://api.oeus-kraken.systems/v1/graphql/" // Test
const jwtToken = "PLACE_JWT_TOKEN_HERE"
let headers = {
"Authorization": `JWT ${jwtToken}`
}
const query = `
query isValidSubdomainQuery($subdomain: String!) {
isValidSubdomain(subdomain: $subdomain) {
isValid
}
}
`
const variables = {
"subdomain": "some_cool_subdomain"
}
axios({
url: apiUrl,
method: "post",
data: {
query: query,
variables: variables,
},
headers: headers,
}).then((response) => {
console.log(JSON.stringify(response.data, null, 4));
});