Matt Gifford aka coldfumonkeh | Consultant Developer
View Github Profile


monkehTweet Authorization Issue Without Callback URL Defined

Jan 28, 2014

Some users have experienced the following error when authenticating and authorizing their ColdFusion Twitter application using monkehTweet:

AUTHURL is undefined in AUTHSTRUCT - monkehTweets

I experienced this issue again last night when testing and updating the code, but only when I ran through the authorization process to grant permissions for a new user.

After a little digging around the answer (as they most often are) was quite simple.

Although I was sending through a callback URL in the code as below:

authStruct = application.objMonkehTweet.getAuthorisation(
  callbackURL='http://127.0.0.1:8500/monkehTweet/authorize.cfm'
);

The issue was that I had not defined a callback URL for this application in the app settings on dev.twitter.com. It had been left blank, and if that is the case the OAuth process assumes you are running an OOB request (Out Of Bounds) for mobile authentication. This fails the authorisation as the callback url set in the local code does not match the literal string ‘oob’.

To change this, log into the application on dev.twitter.com and go to the Settings tab:

Twitter Application Settings

Enter a URL in the callback URL field. This does not have to be the exact callback you will use, but as long as one is entered and it is not blank Twitter will know this is not an OOB request. Until a value is entered into this field, the API key will be “protected” from callback usage.

Twitter Application Callback URL

This should solve the above error for anyone experiencing it.


Latest Blog Posts

Jul 16, 2020
Github Actions with CommandBox and TestBox
Read More
Jul 9, 2020
Azure pipelines with CommandBox and TestBox
Read More
Dec 23, 2019
CFML content moderation detection component library
Read More