import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
sinch: {
type: "app",
app: "sinch",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.sinch.$auth.region}.conversation.api.sinch.com/v1/projects/${this.sinch.$auth.project_id}/contacts`,
headers: {
Authorization: `Bearer ${this.sinch.$auth.oauth_access_token}`,
},
})
},
})
Emit new event when a new fax is received. See the documentation
Emit new event when a new message is received. See the documentation
Sinch uses OAuth authentication. When you connect your Sinch account, Pipedream will open a popup window where you can sign into Sinch and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Sinch API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://auth.sinch.com/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
grant_type=client_credentials
POST
https://auth.sinch.com/oauth2/token
accept: application/json
grant_type=client_credentials