Sign in to a private preview as a team member
POST
/api/v1/gate/member-code
const url = 'https://api.deploybase.eu/api/v1/api/v1/gate/member-code';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"host":"feat-blog-site.previews.deploybase.eu","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/gate/member-code \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "host": "feat-blog-site.previews.deploybase.eu", "return": "/docs/", "state_hash": "n4bQgYhMfWWaL-qgxVrQFaO_TxsrC4Is0V1sFbDwCgg" }'Requires a person’s session (API keys and agent tokens are refused with 403). The preview host names the team: the caller’s active team and X-Deploybase-Team are ignored. Not a member, and an unknown or public host, all answer 403 GATE_NOT_A_MEMBER.
Authorizations
Section titled “ Authorizations ”Request Body
Section titled “ Request Body ”Host, state hash and return path from the gate link
Media type application/json
object
host
string
Example
feat-blog-site.previews.deploybase.eu 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" }}Forbidden
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