Twitter integration with Alexa

I am trying to account link alexa with Twitter and so far I have the setup the twitter app in twitter dev and also configured the account linking in alexa developer console. I am stuck on getting an request token to convert into an access token from twitter. I’m not sure if this needs to be hard coded or not, I will share photos of what I have and what I am getting.

Should I hard code or use a POST request to get a request token? I am getting an error from twitter when I try to link the account that says I need a request token.

![api reference|690x361]

Here is the error I am getting from pressing account linking from I am completely lost now

I have not tried yet but

  • Alexa’s account linking requires OAuth2

  • Twitter OAuth for Twitter Login only supports OAuth1, which Alexa’s acocunt linking does not support. Twitter also supports OAuth2 but seems it is for application only, not for user login.

Application-only authentication: OAuth2 (bearer token)

Application-only authentication is a form of authentication where an application makes API requests on its own behalf, without the user context. This method is for developers that just need read-only to access public information.


Application-user authentication: OAuth 1a (access token for user context)
The user authentication method of authentication allows an authorized app to act on behalf of the user, as the user.

So, I think you need something in the middle between alexa and twitter for acount linking. I’m not sure if it can be done by voiceflow’s custom code block.

Anyway, this might be your help.

Or you can try authentication services such as Auth0 or Amazon Cognito as middleware, which supports Twitter login (although I’ve not tried…)

1 Like

Kun432, thanks a million. I did not even check Alexa’s OAuth verification, just Twitter’s. Now I know moving forward that account linking has to be supported both ways.

I am going to try each and every of the possible solutions you have provided and then share back in this thread if I personally have found one of the solutions to work. Thank you very much for the assistance, I was lost and had simply put it aside until I knew more. Now I will resume.