Code Monkey home page Code Monkey logo

alexa.net.profile's Introduction

Alexa.NET.Profile

Small helper library for Alexa.NET based skills to access the customer and person profile APIs

Asking your user for consent to get customer information

using Alexa.NET.Response

var response = ResponseBuilder.TellWithAskForPermissionConsentCard(
    "sorry, but you have to give me consent",
    new[]{
        CustomerProfilePermissions.FullName,
        CustomerProfilePermissions.Email
    }
);

Getting customer profile information

using Alexa.NET.Profile

var client = new CustomProfileClient(skillRequest);
var fullName = await client.FullName();
var email = await client.Email();

Getting person profile information

using Alexa.NET.Profile

var client = new PersonProfileClient(skillRequest);
var fullName = await client.FullName();

alexa.net.profile's People

Contributors

stoiveyp avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

alexa.net.profile's Issues

Add Error Status Code

You should add the HTTP Error Status Code to failed request calls. When the API returns a 403, that means that the requested permissions have not been applied. Developers could use this to notify the end user that the request failed due to a lack of permissions.

CustomerProfilePermissions wrong scope value ?

Hi, I'm trying to create/update a skill enabling the permission "Region And Postal Code"
The constant value for CustomerProfilePermissions.RegionAndPostalCode is "read::alexa:device:all:address:country_and_postal_code"

However, when I use this constant to create/update a skill, I get the following error...

{
  "message": "Skill manifest is not valid.",
  "violations": [
    {
      "code": "INVALID_ENUM_VALUE",
      "message": "String instance at property path \"$.manifest.permissions[2].name\" has invalid enum value: \"read::alexa:device:all:address:country_and_postal_code\".",
      "validationDetails": {
        "originalInstance": {
          "dataType": "string",
          "propertyPath": "$.manifest.permissions[2].name",
          "value": "read::alexa:device:all:address:country_and_postal_code"
        }
      }
    }
  ]
}

I used the API's to retrieve a skill where I have already enabled "Region And Postal Code" and the value that comes back in permission is actually "alexa:devices:all:address:country_and_postal_code:read"

When I use this value I get no issues creating/updating skill or using it in a TellWithAskForPermissionsConsentCard response.

Could this be updated please?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.