predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Szeto <don...@apache.org>
Subject Re: Missing accessKey error, but I am providing the access key
Date Wed, 04 Oct 2017 04:59:13 GMT
Hi Noelia,

The URL should be http://localhost:7070/events.json?accessKey=myaccesskey
instead.

Regards,
Donald

On Tue, Oct 3, 2017 at 6:10 AM, Noelia Osés Fernández <noses@vicomtech.org>
wrote:

> Hi all,
>
> I'm new with Prediction IO and in order to understand how it works I'm
> customizing the Universal Recommender template to a very simple case (the
> handmade example works).
>
> I have unzipped the universal recommender and changed the folder name to
> TinyApp.
>
> I have then used 'pio app new TinyApp' to create the app id and access key.
>
> I'm now trying to add some data (I'm using the proper access key as listed
> in pio app list instead of *myaccesskey*):
>
> curl -i -X POST http://localhost:7070/events.json?access_key=*myaccesskey*
> -H "Content-Type: application/json" -d '{
>   "event" : "view",
>   "entityType" : "user",
>   "entityId" : "u1",
>   "targetEntityType" : "item",
>   "targetEntityId" : "i1",
> }'
>
> But I get the following error message:
>
> HTTP/1.1 401 Unauthorized
> Server: spray-can/1.3.3
> Date: Tue, 03 Oct 2017 13:06:58 GMT
> Content-Type: application/json; charset=UTF-8
> Content-Length: 32
>
> {"message":"Missing accessKey."}
>
> Why is this? What am I doing wrong?
>
> Thank you very much for your help!
>
> Regards,
> Noelia
>
>
>
>
>

Mime
View raw message