How to pass authentication parameters with REST call?


I want to automate sending of direct messages to my followers.
Do I need to create an app for that? What kind of app would it be, as I will be making the REST calls directly from another framework.
I tried registering my app and getting consumer and secret keys, I even managed to get an access token, but how do I use them?
Do I need to pass them as headers in my REST call?
I will be specifically using the call.
Could someone please point me towards a good example?