Dynamiq
End User Requirements

Start an OAuth2 authorization

Starts an OAuth2 authorization flow for a `connection` requirement whose connection type is OAuth2-based with a configured provider (Google, GitHub, Dropbox, Box, Notion, or Microsoft). Creates a pending end-user connection and returns the provider's authorization URL; redirect the end user there to grant consent. The connection becomes active — and the requirement `completed` — once the provider redirects back and the authorization completes. The request has no body. Served on the management API; authenticate with a connect token.

POST
/v1/connect/requirements/{requirement_id}/oauth2/authorize

Authorization

connectToken
AuthorizationBearer <token>

Short-lived Connect token identifying a single end user of a single app. Created with POST /v1/connect/tokens on the deployed app's hostname and valid for 24 hours. Accepted only by the /v1/connect/* requirement-fulfillment endpoints on the management API — it is distinct from Access Keys and Personal Access Tokens and grants no other API access. Send as Authorization: Bearer <connect-token>.

In: header

Path Parameters

requirement_id*string

Requirement UUID.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/connect/requirements/497f6eca-6276-4993-bfeb-53cbbbba6f08/oauth2/authorize"
{
  "data": {
    "url": "https://accounts.google.com/o/oauth2/auth?client_id=...&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&state=..."
  }
}
{
  "error": {
    "code": "bad_request",
    "message": "Bad Request",
    "details": {
      "input": "cannot be blank"
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Unauthorized"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not Found"
  }
}