coco
10/08/2024, 3:43 PMCourier.setIOSForegroundPresentationOptions(options: [
...
]);
Bright Olawale
10/17/2024, 12:59 PMIndopan
10/18/2024, 2:50 PMBrandon
10/22/2024, 2:59 PMfrom trycourier import Courier
client.send(event=event,
recipient=recipient_id,
profile={"email": email_to, "phone_number": phone},
data=data,
override=override)
to send emails using python.
How do i override the 'fromAddress' such that we can send from one of the other domains we have configured in mailgun?
We only want to override this from address in some circumstances (we do not want to change the default from address in the provider config)
Any idea how we can do this? I saw some docs on how to override the mailgun provider, but none on how to override when we are using client.send and passing event,recipient etc like we areneondream
11/19/2024, 10:42 AMUmair A
11/24/2024, 11:39 PMcreateOrReplace(tenantId: string, ...
method available for tenants ? I can't seem to find one and not sure how best to add tenant's in. Use-case is that as a SaaS product, I want to just create the users in Courier for my own tenantsPaul
12/02/2024, 1:31 AM{
"errorMessage": "Maximum time expired and still no status available from provider.",
"provider": "mailgun",
"retryCount": 16,
"willRetry": false,
"source": "polling"
}
https://cdn.discordapp.com/attachments/1062886075229548624/1312954238409637928/image.png?ex=675842ab&is=6756f12b&hm=16232cf9efee0e8b223e24a767d6385f7994e6d085d4ba0fbc2d09ad451a0fbd&Paul
12/19/2024, 3:26 AMPaul
12/21/2024, 12:06 AMdanishahmed219
01/07/2025, 10:11 PMankitjey
01/14/2025, 7:10 AM{
"channel": "inbox",
"selected": false,
"reason": "None of provider(s) slack,discord,msteams,gmail,webhook is configured for channel inbox."
},
The request id for the same is 1-67860b17-25262c9d159193d0f52b3c14
Is there something I am doing wrong or something wrong with our setup?Ryan Christiani
01/21/2025, 10:53 PM{
"scope": "user_id:{{userId}} inbox:read:messages inbox:write:events"
}
ThanksAndrei
01/22/2025, 9:47 PMIndopan
01/23/2025, 2:48 PMankitjey
01/27/2025, 7:11 PM1-678d9228-2c3d107a799738637dc7f311
AS
02/01/2025, 3:35 AMAS
02/01/2025, 3:57 AMmufeed
02/04/2025, 12:50 PMmufeed
02/07/2025, 7:14 AMmufeed
02/07/2025, 7:27 AMRohit Shrestha
02/20/2025, 7:26 AMHiddenDemise
02/20/2025, 1:46 PM# Install Courier SDK: pip install trycourier
from trycourier import Courier
client = Courier(auth_token="YOUR_AUTH_TOKEN_HERE")
resp = client.send_message(
message={
"to": {
"email": "email",
},
"template": "RENBSWB0004NY5MR694HE142ZH7D",
"data": {
"firstName": "firstName",
"verificationLink": "verificationLink",
"SenderName": "SenderName",
},
}
)
print(resp['requestId'])
Source from github:
import courier
from courier.client import Courier
client = Courier(
authorization_token="YOUR_TOKENY" # Defaults to COURIER_AUTH_TOKEN
)
response = client.send(
message=courier.ContentMessage(
to=courier.UserRecipient(
email="marty_mcfly@email.com",
data={
"name": "Marty",
}
),
content=courier.ElementalContentSugar(
title="Back to the Future",
body="Oh my {name}, we need 1.21 Gigawatts!",
),
routing=courier.Routing(method="all", channels=["inbox", "email"]),
)
)
print(response)
Takeaways are the outdated package import, and the auth_token vs authorization_token fieldAsadbek Abduvoitov
02/28/2025, 12:43 PMJose 👑
03/11/2025, 6:20 AMjansonxavier
03/13/2025, 10:19 PMimport { CourierClient } from "@trycourier/courier";
const courier = new CourierClient({
authorizationToken: process.env.COURIER_AUTH_TOKEN,
});
export const createNotification = async (
user_uid: string,
type: string,
thread_id: string
) => {
try {
const { requestId } = await courier.send({
message: {
to: {
user_id: user_uid,
},
content: {
title: "Reminder",
body: "You have a reminder",
},
routing: {
method: "single",
channels: ["inbox"],
},
data: {
user_uid,
type,
thread_id,
},
},
});
return requestId;
} catch (error) {
console.error(error);
throw error;
}
};
When I get these messages on the frontend with Courier's provider, the data is present. However, when I get the data on the backend with CourierClient, the data doesn't seem to be there
export async function getCourierMessage(messageId: string) {
try {
const courier = getClient();
const response = await courier.messages.get(messageId);
console.log(JSON.stringify(response, null, 2));
return response as any;
} catch (error) {
console.error("Error fetching courier message:", error);
return null;
}
}
The console log of response doesn't seem to match the expected type. I can't seem to find the data that I sent with the message here. I have also tried courier.messages.getContent and courier.messages.getHistory. Thank you in advance!!FentimanJ
03/18/2025, 3:02 PMMAT
03/25/2025, 4:02 AMutopia
04/08/2025, 8:37 PMutopia
04/08/2025, 9:06 PMDZ
04/10/2025, 12:18 PMslackBlocks
? I couldn't get these docs to work: https://www.courier.com/docs/platform/content/elemental/elements#example-3