So are you following this method in this order?
Then you can put in your App ID and secret into the curl scripts.
Example Script
Example Application:
Application ID [Your application ID here]
Application Secret [Your application Secret here]
Type Client Credentials
Get token doc example:
curl -i -v "https://api.omniture.com/token" -u '[Application ID]:[Application Secret]' -d "grant_type=client_credentials"
example to get the stream (on a mac from terminal):
curl "[insert stream url here]" --header "Authorization: Bearer [paste token here]" --compressed
Be sure to put your client credentials exactly. It looks like your call is failing on the first call on the Grant Type.