4

How do I get a registration code or otherwise solve this problem?

While writing this question, I realized the crux of this problem is the bottom-most part of this question: I'm not getting the popup I'm supposed to get and when I enter the URL in a browser it says invalid registration code.

I'm attempting to develop an Alexa Voice Service application. Website/companion service only. I have gone through the Reference Implementation Guide twice and have double checked that all of the setup has been done correctly.

This is the server error I get: invalid registration code. I never did anything with a registration code and can't seem to find anything about a registration code (relevant to Alexa) anywhere after googling quite a bit.

Listening on port 3000 error: { [InvalidRegistrationCode: The provided registration code was invalid.] name: 'InvalidRegistrationCode', message: 'The provided registration code was invalid.', status: 401 } Error: Can't set headers after they are sent.

Here's the client output:

vlcj: (DefaultMediaPlayer.java:183)        
addMediaPlayerEventListener(listener=com.amazon.alexa.avs.AVSAudioPlayer$1@4b3a4950)
There was a problem connecting to the Companion Service. Trying again         in 2 seconds. Please make sure it is up and running. 
[DEBUG] joining on thread Thread[Timer-0,5,com.amazon.alexa.avs.AVSApp]
There was a problem connecting to the Companion Service. 
Trying again in 2 seconds. Please make sure it is up and running.

The AVS launcher opens too, and when I record something and send it I get:

com.amazon.alexa.avs.AVSException: 403 Invalid Access Token

The instructions mention (at the very bottom of the reference guide) that I need to: Please register your device by visiting the following website on any system and following the instructions: https://localhost:3000/provision/************** That URL is supposed to pop something up once the companion service but that hasn't happened.

Any thoughts on how can I fix this?

JohnAllen
  • 7,317
  • 9
  • 41
  • 65

2 Answers2

2

I was following a good document Project: Raspberry Pi + Alexa Voice Service at https://github.com/amzn/alexa-avs-raspberry-pi . It describes all steps very well. Please take a look at the following steps:

3 - Getting started with Alexa Voice Service
3.1 Register for a free Amazon Developer Account
3.4 Register your product and create a security profile.
6 - Enable Security Profile
Sergey V.
  • 840
  • 8
  • 15
1

This thread on the Amazon developer forums seems related: http://forums.developer.amazon.com/forums/thread.jspa?threadID=11327&tstart=0

Quoted response:

There are a number of potential issues causing that error.

You might be sending an invalid scope. Are you sending "alexa:all" as the scope? Or, your security profile might not be correctly linked. Is it selected in the dropdown on the developer portal?

Are you getting an access token from the companion service, or is the text box blank? If you're not getting an access token, check that your device serial number matches between the companion service and the java client. If you're getting an access token, the problem is more likely with your security profile.

You should also look at these threads to see if they're helpful... (links removed due to reputation requirement)

If that doesn't help, you'll probably have more luck asking the AVS team directly on their forum site.