@classmethod<EOL><INDENT>def from_http(<EOL>cls,<EOL>raw_body: MutableMapping,<EOL>verification_token: Optional[str] = None,<EOL>team_id: Optional[str] = None,<EOL>) -> "<STR_LIT>":<DEDENT>
if verification_token and raw_body["<STR_LIT>"] != verification_token:<EOL><INDENT>raise exceptions.FailedVerification(raw_body["<STR_LIT>"], raw_body["<STR_LIT>"])<EOL><DEDENT>if team_id and raw_body["<STR_LIT>"] != team_id:<EOL><INDENT>raise exceptions.FailedVerification(raw_body["<STR_LIT>"], raw_body["<STR_LIT>"])<EOL><DEDENT>if raw_body["<STR_LIT>"]["<STR_LIT:type>"].startswith("<STR_LIT:message>"):<EOL><INDENT>return Message(raw_body["<STR_LIT>"], metadata=raw_body)<EOL><DEDENT>else:<EOL><INDENT>return Event(raw_body["<STR_LIT>"], metadata=raw_body)<EOL><DEDENT>
Create an event with data coming from the HTTP Event API.

If the event type is a message a :class:`slack.events.Message` is returned.

Args:
    raw_body: Decoded body of the Event API request
    verification_token: Slack verification token used to verify the request came from slack
    team_id: Verify the event is for the correct team

Returns:
    :class:`slack.events.Event` or :class:`slack.events.Message`

Raises:
    :class:`slack.exceptions.FailedVerification`: when `verification_token` or `team_id` does not match the
                                                  incoming event's.