Get installation JWT token
Return a JWT token used to authenticate requests against the specified WordPress installation, including its MCP (Model Context Protocol) endpoint.
Return a JWT token used to authenticate requests against the specified WordPress installation, including its MCP (Model Context Protocol) endpoint.
Provide the WordPress installation (software) identifier in the path. It can
be obtained from GET /api/hosting/v1/wordpress/installations (the id field).
API Token authentication
u123456789WordPress installation (software) identifier
1232456789Pattern: ^[0-9]+$Success response
Signed JWT used to authenticate requests against the WordPress installation
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9Token lifetime in seconds from the moment it was issued
3600Date-time at which the token expires, or null when not provided
2024-06-05T12:08:00ZMCP (Model Context Protocol) endpoint URL for the WordPress installation, or null when not provided
https://example.com/wp-json/hostinger/mcpUnauthenticated response
Error response
GET /api/hosting/v1/accounts/{username}/wordpress/{software}/jwt-token HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
"expires_in": 3600,
"expires_at": "2024-06-05T12:08:00Z",
"mcp_url": "https://example.com/wp-json/hostinger/mcp"
}Last updated
Was this helpful?