POSTapi.synup.com/api/v4/connected-accounts/connect-apple/renew
Renew connect link for Apple
Generates a link to re-authorize an Apple Business Connect connection whose OAuth token has expired or been revoked. Provide either a locationId or a connectedAccountId to identify the connection to renew. Redirect the user to the returned url; the link is valid for 1 day.
Apple OAuth link variants:
- Connect link for Apple — connect a single location.
- Bulk connect link for Apple — connect multiple locations.
- Renew connect link for Apple — re-authorize an existing connection (this endpoint).
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Synup-Version | string | required | API version date (YYYY-MM-DD). |
Body
| Name | Type | Required | Description |
|---|---|---|---|
input | object | required | |
input.locationId | string | optional | Relay-encoded location ID of the connection to renew. |
input.connectedAccountId | string | optional | ID of the connected Apple account to renew (alternative to locationId). |
input.successUrl | string | required | Redirect URL on successful re-authorization. |
input.clientMutationId | string | optional |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/connected-accounts/connect-apple/renew' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"locationId": "TG9jYXRpb246MQ==",
"successUrl": "https://app.synup.com/apple/success"
}
}'const res = await fetch('https://api.synup.com/api/v4/connected-accounts/connect-apple/renew', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": {
"locationId": "TG9jYXRpb246MQ==",
"successUrl": "https://app.synup.com/apple/success"
}
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/connected-accounts/connect-apple/renew",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"input": {
"locationId": "TG9jYXRpb246MQ==",
"successUrl": "https://app.synup.com/apple/success"
}
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/connected-accounts/connect-apple/renew", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successful response |
401 | Unauthorized - Invalid or missing API key |
Example response (generated from the schema)
{
"data": {
"renewConnectLinkForApple": {
"success": true,
"url": "string",
"errors": [
{
"code": "string",
"message": "string",
"contextInfo": [
{}
]
}
],
"clientMutationId": "string"
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.renewConnectLinkForApple | object | optional | |
data.renewConnectLinkForApple.success | boolean | optional | |
data.renewConnectLinkForApple.url | string | optional | OAuth renewal link to redirect the user to (1-day TTL). |
data.renewConnectLinkForApple.errors | array of object | optional | |
data.renewConnectLinkForApple.errors[].code | string | optional | |
data.renewConnectLinkForApple.errors[].message | string | optional | |
data.renewConnectLinkForApple.errors[].contextInfo | array of object | optional | |
data.renewConnectLinkForApple.clientMutationId | string | optional |