How do I send an authenticated request via the REST API?

2 posts, 0 answers
  1. Dan
    Dan avatar
    12 posts
    Member since:
    Jan 2014

    Posted 29 Apr 2014 Link to this post

    I want my app admin to be able to create new users via my app.  I've set up a custom admin role for this purpose.  Using the documentation, I am getting 403 errors because I'm not sending authenticated requests.  How do I send an authenticated request via the REST API?
  2. Anton Dobrev
    Anton Dobrev avatar
    608 posts

    Posted 30 Apr 2014 Link to this post

    Hello Dan,

    When a user authenticates successfully in a Backend Services app, the server will return a Result that holds three components:
    • "access_token" - the token for authenticating the current user.
    • "token_type" - the type of the token.
    • "principal_id" - the Id of the authenticated user.

    The way of authorizing subsequent requests to the REST API on behalf of the currently logged user is to pass the following authorization header containing the access token:
    "Authorization" : "Bearer <access-token-here>"

    Once the administrator is logged in the application he/she can create new user accounts by making requests to',

    with the aforementioned authorization header.

    Please, let us know if this works for you.

    Anton Dobrev
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
Back to Top