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

  • SEARCH
  • Home
  • 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 7587659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:43:42+00:00 2026-05-30T19:43:42+00:00

I have an endpoint in an API I’m currently writing that is meant to

  • 0

I have an endpoint in an API I’m currently writing that is meant to return a filtered list of a user’s Facebook friends. Users authenticate to Facebook on the mobile app calling this endpoint, so the access_token is stored in the mobile app, not in the API’s database.

Endpoint: /users/:id/friends
Parameters: access_token (the requested user's Facebook access_token)
Return: A list of the user's Facebook friends who have the app installed

The action isn’t modifying any data; it is simply returning the filtered list. However, since an extra parameter (access_token) is required, it means that a GET request would not conform with the API’s routing structure, since no other GET routes have an extra parameter appended to them.

Which of the following HTTP requests is appropriate for this action?

GET /users/:id/friends/:access_token
GET /users/:id/friends?access_token=<token>
POST /users/:id/friends (passing 'access_token' as a POST param)
  • 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-05-30T19:43:43+00:00Added an answer on May 30, 2026 at 7:43 pm

    I definitely wouldn’t do it as a POST because you are requesting a resource, not modifying it. It may not fully conform with Rail’s RESTfulness, but I think it conforms a lot better than doing a POST to request a resource.

    You can also do a GET on /users/:id/friends?access_token=<TOKEN> so that you conform more closely.

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

Sidebar

Related Questions

I have a Rails app with an API endpoint that I'd like to authenticate
I have a simple REST service endpoint that is failing when I POST using
I have an API endpoint https://www.example.com/api/authentication which takes username and password as input and
I have a REST endpoint with a page and size parameter: http://someservice.com/api/accounts/10/0 In this
I have this function here that assembles an API call to eBay. It used
I'm writing an api in node.js. The first webservice endpoint - /create - creates
I'm using a Web Service that has a endpoint of http://api.domain_a.com/ and using Visual
I have a spec for a project that accesses a third party remote API
I have an ASP.NET MVC 4 application that needs to use an existing API
I have a service which I am writing that is intended to be used

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.