okitsme_Parth
okitsme_Parth
Explore posts from servers
WWasp-lang
Created by digvijay on 10/23/2023 in #🙋questions
when is the wasp X giveaway today
👍
15 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
If possible can you send me the request body in any other language, whenever you are free
21 replies
WWasp-lang
Created by okitsme_Parth on 10/23/2023 in #🙋questions
Facing error when I use "wasp db migrate-dev"
👍
7 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
Request
21 replies
WWasp-lang
Created by okitsme_Parth on 10/23/2023 in #🙋questions
Facing error when I use "wasp db migrate-dev"
shall i send whole code, wait let me send you the url https://usemage.ai/result/a15841c8-ec59-422b-9b91-ff8d26fbcc0a
7 replies
WWasp-lang
Created by okitsme_Parth on 10/23/2023 in #🙋questions
Facing error when I use "wasp db migrate-dev"
7 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
@Pawan Jain i did some digging and got this output is this sort of correct?
Method: POST
URL: https://api.novu.co/v1/subscribers/bulk
JSON: [{'subscriberId': 'test-subscriber-1', 'email': '[email protected]', 'firstName': 'subscriber-1', 'lastName': 'test-1', 'phone': None, 'avatar': None, 'locale': None, 'channels': None}, {'subscriberId': 'test-subscriber-2', 'email': '[email protected]', 'firstName': 'subscriber-2', 'lastName': 'test-2', 'phone': None, 'avatar': None, 'locale': None, 'channels': None}, {'subscriberId': 'test-subscriber-3', 'email': None, 'firstName': None, 'lastName': None, 'phone': None, 'avatar': None, 'locale': None, 'channels': None}]
Payload: None
Headers: None
Method: POST
URL: https://api.novu.co/v1/subscribers/bulk
JSON: [{'subscriberId': 'test-subscriber-1', 'email': '[email protected]', 'firstName': 'subscriber-1', 'lastName': 'test-1', 'phone': None, 'avatar': None, 'locale': None, 'channels': None}, {'subscriberId': 'test-subscriber-2', 'email': '[email protected]', 'firstName': 'subscriber-2', 'lastName': 'test-2', 'phone': None, 'avatar': None, 'locale': None, 'channels': None}, {'subscriberId': 'test-subscriber-3', 'email': None, 'firstName': None, 'lastName': None, 'phone': None, 'avatar': None, 'locale': None, 'channels': None}]
Payload: None
Headers: None
21 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
I think SDK has some issues
21 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
@Pawan Jain it works
21 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
Not really, let me try and get back to you 🫡
21 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
No that will not work as the method adds /v1/subscribers/bulk itself at the end of the url
21 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
@sumitsaurabh927 if you are free, pls consider helping me here
21 replies
NNovu
Created by okitsme_Parth on 10/23/2023 in #💬│support
Facing 400 Client Error: Bad Request for url: https://api.novu.co/v1/subscribers/bulk
Code i used:
from novu.dto.subscriber import SubscriberDto
from novu.api.subscriber import SubscriberApi

url = "https://api.novu.co"
api_key = "its_secrettttt"

subscribers = [
SubscriberDto(
subscriber_id='test-subscriber-1',
first_name='subscriber-1',
last_name='test-1'
),
SubscriberDto(
subscriber_id='test-subscriber-2',
first_name='subscriber-2',
last_name='test-2'
),
SubscriberDto(
subscriber_id='test-subscriber-3'
)
]

novu = SubscriberApi(url, api_key).bulk_create(subscribers)
from novu.dto.subscriber import SubscriberDto
from novu.api.subscriber import SubscriberApi

url = "https://api.novu.co"
api_key = "its_secrettttt"

subscribers = [
SubscriberDto(
subscriber_id='test-subscriber-1',
first_name='subscriber-1',
last_name='test-1'
),
SubscriberDto(
subscriber_id='test-subscriber-2',
first_name='subscriber-2',
last_name='test-2'
),
SubscriberDto(
subscriber_id='test-subscriber-3'
)
]

novu = SubscriberApi(url, api_key).bulk_create(subscribers)
21 replies