Save a search connection
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/webmasters \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"token": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>', token: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/webmasters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.1-news.app/v1/projects/{projectId}/webmasters"
payload = {
"provider": "<string>",
"token": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"last4": "<string>"
}Search
Save a search connection
Save a Google, Bing, or Brave verification token for a connected domain.
POST
/
v1
/
projects
/
{projectId}
/
webmasters
Save a search connection
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/webmasters \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"token": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: '<string>', token: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/webmasters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.1-news.app/v1/projects/{projectId}/webmasters"
payload = {
"provider": "<string>",
"token": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"last4": "<string>"
}Save a verification token. The newsroom needs an active custom domain. An admin can do this. The token is not returned again.