Sign in to a private preview with its guest password
POST
/api/v1/public/gate/password
const url = 'https://api.deploybase.eu/api/v1/api/v1/public/gate/password';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"host":"feat-blog-site.previews.deploybase.eu","password":"example","return":"/docs/","state_hash":"n4bQgYhMfWWaL-qgxVrQFaO_TxsrC4Is0V1sFbDwCgg"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.deploybase.eu/api/v1/api/v1/public/gate/password \ --header 'Content-Type: application/json' \ --data '{ "host": "feat-blog-site.previews.deploybase.eu", "password": "example", "return": "/docs/", "state_hash": "n4bQgYhMfWWaL-qgxVrQFaO_TxsrC4Is0V1sFbDwCgg" }'Public. On success returns the preview host’s gate callback URL with a 60-second code. A wrong password, an unknown host and a host without a guest password all answer 401 GATE_WRONG_PASSWORD. 429 GATE_RATE_LIMITED (with Retry-After) covers both the per-network attempt limit and the pause after 100 wrong passwords in a row.
Request Body
Section titled “ Request Body ”Host, state hash and return path from the gate link, and the password
Media type application/json
object
host
string
Example
feat-blog-site.previews.deploybase.eu password
string
return
string
Example
/docs/ state_hash
string
Example
n4bQgYhMfWWaL-qgxVrQFaO_TxsrC4Is0V1sFbDwCggResponses
Section titled “ Responses ”OK
Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
redirect_url
string
Example
{ "data": { "redirect_url": "https://feat-blog-site.previews.deploybase.eu/.deploybase/gate/callback?code=eyJ..." }}Bad Request
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Too Many Requests
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Service Unavailable
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Live a8b7eb1d built