with Microsoft Advertising and Facebook Graph API?
The Microsoft Advertising API allows you to programmatically manage your advertising campaigns. Using this API on Pipedream, you can create, read, update, and delete campaigns, ad groups, and ads. You can also retrieve reports to analyze performance. Pipedream's serverless platform lets you connect the Microsoft Advertising API to a plethora of other services to automate workflows, sync data across platforms, and react to events in real time.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
microsoft_advertising: {
type: "app",
app: "microsoft_advertising",
}
},
async run({steps, $}) {
const data = {}
return await axios($, {
method: "post",
url: `https://clientcenter.api.bingads.microsoft.com/CustomerManagement/v13/Notifications/Query`,
headers: {
Authorization: `Bearer ${this.microsoft_advertising.$auth.oauth_access_token}`,
"content-type": `application/json`,
"developertoken": `${this.microsoft_advertising.$auth.developer_token}`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
facebook_graph_api: {
type: "app",
app: "facebook_graph_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://graph.facebook.com/me/`,
headers: {
Authorization: `Bearer ${this.facebook_graph_api.$auth.oauth_access_token}`,
},
})
},
})