Grant or deny access to a client (dashboard session). Returns where to redirect.
POST
/v1/oauth/authorization
const url = 'https://api.replifier.com/v1/oauth/authorization';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"query":"example","decision":"allow","organizationId":"example","brandIds":["example"],"scopes":["example"]}'};
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.replifier.com/v1/oauth/authorization \ --header 'Content-Type: application/json' \ --data '{ "query": "example", "decision": "allow", "organizationId": "example", "brandIds": [ "example" ], "scopes": [ "example" ] }'No pre-checked boxes: the screen sends exactly the scopes the user checked (scopes, a subset of the requested ones). brandIds null = all brands the user has access to. It grants nothing the user cannot do: the effective permissions are still those of their membership on every call.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
query
required
string
decision
required
string
organizationId
string
brandIds
Array<string>
scopes
Array<string>
Responses
Section titled “Responses”Redirect to the client
Media typeapplication/json
object
redirectTo
required
string
Example generated
{ "redirectTo": "example"}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}