English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/account/instagram/unified/authorizeStarts turning on Music & Research for an Instagram account that is already connected. It returns the Meta Business login URL: the user logs in with Facebook or Instagram, picks the Instagram account, and is sent back to your redirect with a code. Send that code to Connect Instagram Music & Research. Each url from Authorize works for one login: once the user is sent back to your redirect, call Authorize again for the next login.
Music & Research adds a second access to the same account, used only for music on scheduled Reels (Get Instagram Audio) and Instagram research. Comments, messages, automation, statistics, and webhooks stay on the Instagram connection. No account is added and no account slot is used. See Instagram Music & Research.
Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Replizaccount:write| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | ID of the connected Instagram account, the _id from Get Account. Send the same ID to Connect. |
redirect | string | Yes | The full URL of your page that the user is sent back to after the login, for example https://app.example.com/oauth/instagram-music. The authorization code is added to it as a query parameter. URL-encode it in the query string. It must start with https:// or http://, or be an app scheme such as com.example.app:/callback for a mobile app. |
curl -X GET "https://api.repliz.com/public/account/instagram/unified/authorize?accountId=680affa5ce12f2f72916f67e&redirect=https://app.example.com/oauth/instagram-music" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"import axios from 'axios';
const response = await axios.get('https://api.repliz.com/public/account/instagram/unified/authorize', {
params: {
accountId: '680affa5ce12f2f72916f67e',
redirect: 'https://app.example.com/oauth/instagram-music',
},
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
});
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const params = new URLSearchParams({
accountId: '680affa5ce12f2f72916f67e',
redirect: 'https://app.example.com/oauth/instagram-music',
});
const response = await fetch(`https://api.repliz.com/public/account/instagram/unified/authorize?${params}`, {
headers: {
Authorization: `Basic ${credentials}`,
},
});
const data = await response.json();
console.log(data);{
"url": "https://www.facebook.com/dialog/oauth?client_id=1235158581557624&config_id=1807348740199306&redirect_uri=https://repliz.com/callback/instagram-unified..."
}{
"code": 400,
"message": "invalid account type"
}{
"code": 404,
"message": "account not found"
}{
"code": 401,
"message": "unauthorized"
}400 with invalid account type means accountId isn't an Instagram account.