import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
liveswitch: {
type: "app",
app: "liveswitch",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://public-api.production.liveswitch.com/v1/me`,
headers: {
Authorization: `Bearer ${this.liveswitch.$auth.oauth_access_token}`,
},
})
},
})
Create a conversation in LiveSwitch See the documentation
LiveSwitch uses OAuth authentication. When you connect your LiveSwitch account, Pipedream will open a popup window where you can sign into LiveSwitch and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any LiveSwitch API.
Pipedream requests the following authorization scopes when you connect your account:
openid
profile
email
offline_access
me
webhooks.write
conversations.write
contacts.write
GET
https://supbubble-prod.us.auth0.com/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
audience=https://public-api.production.liveswitch.com/
&
state={{oauth.state}}
POST
https://supbubble-prod.us.auth0.com/oauth/token
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
code={{oauth.code}}
&
grant_type=authorization_code
POST
https://supbubble-prod.us.auth0.com/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
refresh_token={{oauth.refresh_token}}
&
grant_type=refresh_token