Start Integration Module OAuth Flow
POST/homes/{homeId}/intmods/{configId}/oauth/start
Base URL: https://api.tinkermode.com
If an integration module includes an OAuth flow to connect with an external service, the frontend app should use this set of endpoints to manage the authentication process. This specific endpoint is used to start the integration module OAuth flow. The frontend app must call this endpoint to initiate the OAuth flow and redirect the user to the external service for login.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain the API key of a user or service account who has the permission to start the specified integration module configuration, or a Project API Key with admin permission.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
homeId | integer | Yes | The unique ID for a specified home. | |
configId | string | Yes | Integration Module Configuration ID |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
authUrl | string | No | Auth URL for the OAuth flow. The front end should be redirected to this URL to start the OAuth flow. |
Request example
{
"redirectUri": "https://example.com/oauth/callback",
"state": "1234567890"
}Responses
200 The authorization URL has been returned.
Content type: application/json
Response example
{
"authUrl": "https://example.com/oauth2/authorize"
}401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of invalid data or denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |