getEmbeddedGraphResource method
Implementation
Future<String?> getEmbeddedGraphResource(
String apiKey,
String customerId,
String externalUserId,
String type, {
int? brandId,
}) async {
try {
final payload = {
'useExternal': true,
'type': type,
};
if (brandId != null) {
payload['brandId'] = brandId;
}
final result = await dio.post(
'${Config.url}/graphs/$externalUserId/link',
data: payload,
options: Options(
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
"x-api-key": apiKey,
"x-customer": customerId,
},
),
);
return result.data['link'];
} catch (e) {
return null;
}
}