This is a migrated thread and some comments may be shown as answers.

Current User

4 Answers 174 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kevin
Top achievements
Rank 1
Kevin asked on 07 Aug 2013, 07:43 PM
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.

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 12 Aug 2013, 10:57 AM
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.
0
Kevin
Top achievements
Rank 1
answered on 13 Aug 2013, 12:13 PM
Yes i tried this and always get this.
0
Kevin
Top achievements
Rank 1
answered on 17 Aug 2013, 07:03 PM
Help!!!!!
0
Anton Sotirov
Telerik team
answered on 21 Aug 2013, 12:39 PM
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.
Tags
General Discussion
Asked by
Kevin
Top achievements
Rank 1
Answers by
Steve
Telerik team
Kevin
Top achievements
Rank 1
Anton Sotirov
Telerik team
Share this question
or