Updating the connections

I am updating the client ID and client secret for a Social Connection in our application. Currently, I am encountering a “payload validation error” when attempting to make the update using the /api/v2/connections/{id} endpoint.
can someone tell the correct format for composing the payload.

Hi @abhijeet.mishra

It depends on the provider. For example here’s a working payload for Facebook connections in Python.

		payload = {
			"name":"facebook",
			"strategy":"facebook",
			"options":{"client_id":"myappid",
			"client_secret":"myappsecret",
			"set_user_root_attributes":"on_first_login",
			"public_profile":True,
			"email":False,
			"groups_access_member_info":False,
			"publish_to_groups":False,
			"user_age_range":False,
			"user_birthday":False,
			"user_events":False,
			"user_friends":False,
			"user_gender":False,
			"user_hometown":False,
			"user_likes":False,
			"user_link":False,
			"user_location":False,
			"user_photos":False,
			"user_posts":False,
			"user_tagged_places":False,
			"user_videos":False,
			"ads_management":False,
			"ads_read":False,
			"business_management":False,
			"leads_retrieval":False,
			"manage_pages":False,
			"pages_manage_cta":False,
			"pages_manage_instant_articles":False,
			"pages_show_list":False,
			"pages_messaging":False,
			"pages_messaging_phone_number":False,
			"pages_messaging_subscriptions":False,
			"publish_pages":False,
			"publish_video":False,
			"read_audience_network_insights":False,
			"read_insights":False,
			"read_page_mailboxes":False,
			"manage_notifications":False,
			"publish_actions":False,
			"read_stream":False,
			"read_mailbox":False,
			"user_groups":False,
			"user_managed_groups":False,
			"user_status":False,
			"allow_context_profile_field":False}
			}

		r = requests.post(url + f'/api/v2/connections', headers=headers, json=payload).json()