Email ToolKit
Access Toolkit APIs with the Skyfire SDK enabling you to send emails via code.
-
Step 1: Install the Skyfire SDK
npm install @skyfire-xyz/skyfire-sdk
pip install skyfire-sdk
-
Step 2: Initialize the SDK
import { SkyfireClient } from '@skyfire-xyz/skyfire-sdk' const skyfire = new SkyfireClient({ apiKey: 'YOUR_API_KEY' })
import skyfire_sdk configuration = skyfire_sdk.Configuration( host = "https://api.skyfire.xyz" ) configuration.api_key['ApiKeyAuth'] = "YOUR_API_KEY"
-
Step 3: Call any of the Toolkit APIs supported by the SDK
// send out an email async function toolkitSendEmail(email: EmailDumpRequest): Promise<any>{ let res = await skyfire.toolkit.sendEmail(email) // use sendEmailWithHttpInfo to get response headers in response return res } const email = { recipientEmail: '[email protected]', emailData: 'Hello World' } toolkitSendEmail(email)
# send an email with skyfire_sdk.ApiClient(configuration) as api_client: api_instance = skyfire_sdk.ToolkitApi(api_client) api_response = api_instance.send_email( email_dump_request= {'recipient_email': '[email protected]', 'email_data': 'hello world'}) # call send_email_with_http_info() to get response headers in response
Updated about 1 month ago