TwiML™ SMS: <Redirect>
<Redirect> verb transfers control of a Message response to the TwiML at a different URL. All verbs after
<Redirect> are unreachable and ignored.
<Redirect> verb supports the following attributes that modify its behavior:
|Attribute Name||Allowed Values||Default Value|
The 'method' attribute takes the value 'GET' or 'POST'. This tells Twilio whether to request the
<Redirect> URL via HTTP GET or POST. 'POST' is the default.
The "noun" of a TwiML verb is the stuff nested within the verb that's not a verb itself; it's the stuff the verb acts upon. These are the nouns for
|plain text||An absolute or relative URL for a different TwiML document.|
No verbs can be nested within
<Redirect> can't be nested in any other verbs.
Example 1: Absolute URL redirect
In this example, we have a
<Redirect> makes a request to http://www.foo.com/nextInstructions and
transfers control to the TwiML returned from that request.
Example 2: Relative URL redirect
Redirects flow control to a TwiML at a URL relative to the current URL.
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.