Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8475837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:00:18+00:00 2026-06-10T18:00:18+00:00

In a REST API, after authentication a user receives an AccessToken, which is then

  • 0

In a REST API, after authentication a user receives an AccessToken, which is then sent along with every request. Server-side, the token is mapped to a UserID of that user.

Let’s say I address the messages resource like this:

GET /user/123/messages

vs. accessing it in this way:

GET /messages/

and pulling the UserID from the AccessToken header.

Which way is more RESTful? I tend towards the first – it seems more readable and cachable, but are there other reasons as well?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:00:20+00:00Added an answer on June 10, 2026 at 6:00 pm

    The first identifies a unique Resource, the second does not. If the meaning of the second URI depends on additional information (the session token), it doesn’t identify anything. So only the first approach is RESTful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a service with REST api, which provides me an authentication token as
I'm designing a REST API. What response should a server send to mean I've
I am developing some REST API's which are returning data in json format. ASP.net
I need to work with REST api in android application which is created by
From REST API of twitter I user get/followers function. I pasted a code snippet
So I decided to use digest HTTP authentication for my REST API. I googled
I followed the RailsCast #350 REST API Versioning and #352 Securing an API which
We have a REST API which clients routinely POST and PUT data to. When
I have been trying to use the server side api provided by Urban Airship
I'm working on a project which requires me to work with an REST API.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.