Skip to content

Get-TwitterDM

SYNOPSIS

Returns one or more direct messages.

SYNTAX

Get-TwitterDM [[-DirectMessageId] <String>] [[-Count] <Int32>] [<CommonParameters>]

DESCRIPTION

Returns one or more direct messages.

If the DirectMessageId is omitted, all DMs from the last 30 days will be returned in reverse chronological order.

EXAMPLES

Example 1

PS > Get-TwitterDM

Returns a list of all DMs from the last 30 days.

Example 2

PS > $Message = Get-TwitterDM -DirectMessageId 1326381283837157381
PS > $Message.event.message_create
target                   sender_id source_app_id message_data
------                   --------- ------------- ------------
@{recipient_id=00000000} 000000000 129032        @{text=Yeah. Let me write an update. I'll do that now.; entities=}

Returns the direct message specified.

PARAMETERS

-DirectMessageId

The id of the Direct Message event that should be returned.

Type: String
Parameter Sets: (All)
Aliases: Id

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Count

Specifies the number of results to retrieve.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

Online Version

Publish-TwitterDM

Unpublish-TwitterDM

Api Reference - GET direct_messages/events/list

Api Reference - GET direct_messages/events/show