Current User

5 posts, 0 answers
  1. Kevin
    Kevin avatar
    5 posts
    Member since:
    Jul 2013

    Posted 07 Aug 2013 Link to this post

    I have tried all the examles and cant seem to get the currentuser back.  I am not using view models in my and just need a simple example.  I am using the Everlive sample template and the login seems to work ok.  I just need a simple simple example to use with my app.

  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 12 Aug 2013 Link to this post

    Hello Kevin,

    Yes, it is possible to retrieve the user by passing the id in the URL:

    //Ajax request using jQuery       
    $.ajax({
        url: 'https://api.everlive.com/v1/<your_API_Key_here>/Users/${Id}',
        type: "GET",
        headers: {"Authorization" : "Bearer ${AccessToken}"},
        success: function(data){
            alert(JSON.stringify(data));
        },
        error: function(error){
            alert(JSON.stringify(error));
        }
    })

    For the current user, instead of the Id of the user, you can also use "me". This will give you the data for the currently logged in user. Example: http://.../Users/me.
    For more information refer to the Icenium Everlive documentation Rest API -> Users (you have to login into the Everlive portal).

    Regards,
    Steve
    Telerik

    Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. Kevin
    Kevin avatar
    5 posts
    Member since:
    Jul 2013

    Posted 13 Aug 2013 Link to this post

    Yes i tried this and always get this.
  4. Kevin
    Kevin avatar
    5 posts
    Member since:
    Jul 2013

    Posted 17 Aug 2013 Link to this post

    Help!!!!!
  5. Anton Sotirov
    Admin
    Anton Sotirov avatar
    4 posts

    Posted 21 Aug 2013 Link to this post

    Hi Kevin,

    We have not been able to reproduce this behaviour. The request you are trying to do is a very basic one and in order to pipoint the problem we will need some more info. Can you please answer the questions below:

    1. Does the Backend work for this application and can you manage the Users?
    2. Have you written custom cloud code for the Users type?
    3. If you create a new application (project) from the Backend, are you able to make the same request?
    4. Do you experience such issues with other content types in that application?

    Please note that on 16 August we expereinced brief server downtime which could have caused that behaviour.

    Best regards,
    Anton Sotirov

    Everlive Team

    Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top