Auth0 Home Blog Docs

Alexa Skill link doesn't return access token secret for Twitter


#1

So I’m in the process of creating an Alexa skill that can read Twitter messages/update a user’s status, but before they can do so, they need to link their Twitter account to the skill. Everything is all good and the account link is successful but the problem is that I’m only seeing that the access token is returned but not the access token secret (which is necessary for me to be able to update a users status and so on). So my question is: is there any way to obtain the access token secret? or am I just asking of something that currently is impossible?


#3

:wave: @ctcuff we should be able to retrieve both the token and the token secret. I believe we can retrieve this information in a Rule like:

function(user, context, callback) {
    // request below is specific to Twitter 
    if (context.connectionStrategy !== 'twitter') {
        return callback(null, user, context);
    }

    ... 
    var twitterIdentity = _.find(user.identities, { connection: 'twitter' });
    var oauthToken = twitterIdentity.access_token;
    var oauthTokenSecret = twitterIdentity.access_token_secret;
    ... 

Would this be what you are looking to do?


#5

Actually yes! This looks like it could work. Although, my skill is written in Java. Do you know of a way to do so in that language?