Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
jupyter-naas
GitHub Repository: jupyter-naas/awesome-notebooks
Path: blob/master/Brevo/Brevo_Get_contact.ipynb
2973 views
Kernel: Python 3

Naas

Brevo - Get a contact's details

Give Feedback | Bug report

Tags: #brevo #contacts #get #snippet

Last update: 2024-05-30 (Created: 2024-05-30)

Description: This notebook get a contact's details in Brevo.

Input

Import libraries

import requests

Setup variables

  • api_key: Brevo API Key

  • contact_id: Contact ID

api_key = "YOUR_BREVO_API_KEY" contact_id = ""

Model

Get a contact

def get_contact( api_key, contact_id, ): # Init data = [] url = f"https://api.brevo.com/v3/contacts/{contact_id}" headers = { "accept": "application/json", "api-key": api_key } res = requests.get(url, headers=headers) if res.status_code == 200: return res.json() result = get_contact(api_key, contact_id) result

Output

Display result

result