You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Custom Domain
CreateBucketCustomDomainToken
Copy page
Download PDF
CreateBucketCustomDomainToken
Description​
This API creates an ownership verification token for a specified bucket’s custom domain. After obtaining the token, add a TXT record to the domain’s DNS to verify domain ownership.​
Notes​
  • You must be the bucket owner or have the CreateBucketCustomDomainToken permission authorized for the current bucket to call this API.​
  • The token is valid for 72 hours by default and expires afterward.​
  • The corresponding ownership verification record will be cleared when deleting the custom domain.​
Request syntax​
​
PUT /?customdomain&token HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 08:05:36 +0000​
Authorization: authorization string​
Content-Type: application/json​
​
{​
"CustomDomainRule": {​
"Domain": "example.com"​
}​
}​
​
Request parameters and headers ​
For common request headers, see common parameters.​
​
Name​
Location​
Type​
Required​
Example value​
Description​
customdomain​
Query​
String​
Yes​
-​
Special identifier for custom domain requests.​
token​
Query​
String​
Yes​
-​
Special identifier for creating custom domain ownership verification token request​
​
Request body elements​
​
Name​
Type​
Required​
Sample value​
Description​
CustomDomainRule​
Object​
Yes​
-​
Custom domain rule.​
Domain​
String​
Yes​
example.com​
Custom domain pending ownership verification.​
​
Response headers​
The response contains common headers. For more information, see common parameters.​
Response body elements​
​
Name​
Type​
Sample value​
Description​
CustomDomainToken​
Object​
-​
Token information for custom domain ownership verification.​
Domain​
String​
example.com​
Custom domain pending ownership verification​
Token​
String​
csdafkjadsifjdsf​
Domain ownership verification token.​
ExpireTime​
Int64​
1768292477445​
Token expiration time.​
Verified​
Bool​
false​
Whether domain ownership has been verified. The options are as follows:​
  • true: verified.​
  • false: not verified.​
​
Sample request​
​
PUT /?customdomain&token HTTP/1.1​
Host: bucketname.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 08:05:36 +0000​
Authorization: authorization string​
Content-Type: application/json​
​
{​
"CustomDomainRule": {​
"Domain": "example.com"​
}​
}​
​
Sample response​
​
HTTP/1.1 200 OK​
Date: Fri, 30 Jul 2021 13:53:55 GMT​
Server: TosServer​
x-tos-id-2: 1e89f203jld00006-a444fd0​
x-tos-request-id: 1e89f203b2d00006-a444ed0​
Content-Length: 128​
​
{​
"CustomDomainToken": {​
"Domain": "example.com",​
"Token": "csdafkjadsifjdsf",​
"ExpireTime": 1768292477445,​
"Verified": false​
}​
}​
​
Error code​
​
Error codes​
Status code​
Description​
AccessDenied​
403​
No operation permission.​
InvalidParams​
400​
Invalid request body format.​
TooManyCustomDomainTokens​
400​
The number of custom domain tokens exceeds the limit.​
​
Last updated: 2026.07.22 10:24:58