-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
After reviewing the api docs https://support.messagemedia.com/hc/en-us/articles/4413635760527-Messaging-API I noticed we can specify an account in headers. I didn't see an option to specify an account with the MessageMediaMessagesClient controller.
Do you recommend monkey patching it in?
something like this
require 'message_media_messages'
class CustomMessagesController < MessageMediaMessages::MessagesController
def send_messages(body, account_id: nil)
request = MessageMediaMessages::APIHelper.json_serialize(body)
headers = {
'Content-Type' => 'application/json'
}
headers['Account'] = account_id if account_id
response = @http_client.post(
@base_uri + '/v1/messages',
headers: headers,
body: request
)
validate_response(response)
end
end
Metadata
Metadata
Assignees
Labels
No labels