import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
the_bookie: {
type: "app",
app: "the_bookie",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://app.thebookie.nl/nl/api/e1/contacts/`,
headers: {
Authorization: `Bearer ${this.the_bookie.$auth.oauth_access_token}`,
},
params: {
admin_id: `${this.the_bookie.$auth.admin_id}`,
},
})
},
})
Instantly creates a new contact in the address book. See the documentation
The Bookie uses OAuth authentication. When you connect your The Bookie account, Pipedream will open a popup window where you can sign into The Bookie and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any The Bookie API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://app.thebookie.nl/nl/o/authorize/
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
response_type=code
POST
https://app.thebookie.nl/nl/o/token/
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
&
admin_id={{custom_fields.admin_id}}
POST
https://app.thebookie.nl/nl/o/token/
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}
&
redirect_uri={{oauth.redirect_uri}}
&
admin_id={{custom_fields.admin_id}}