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 8445191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:35:56+00:00 2026-06-10T09:35:56+00:00

We received a request to create a REST api. I was a little confused

  • 0

We received a request to create a REST api. I was a little confused in the example of provided by our client. As you can see below, they’ve identified the app_id and secret in the URL before the @. The remainder of the URI looks like what I would expect.

Is this valid? I thought maybe this is some weird cURL format I haven’t seen before.

https://{application_id}:{api_secret}@api.example.com/entity/{entity_id}/ 
https://{application_id}:{api_secret}@api.example.com/entity/{entity_id}/entity_locations/{locations_id}/

Just seeing if anyone has seen this format before?

  • 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-10T09:35:57+00:00Added an answer on June 10, 2026 at 9:35 am

    A URI is made up of various parts, one of them being the authority part, which can feature optional username:password element.

    The full scheme is:

    scheme://username:password@domain:port/path?query_string#fragment_id
    

    This way your REST api remains stateless [not relying on previous app states like storing stuff in session]. But I advice you not to explicitly go with the username:password@stuff route, but to rely on Basic HTTP Auth, so the credentials are sent encoded in Base64 at least.


    EDIT: a brief note about BasicAuth now you’re asking – things go like this:

    • you make a request to http://johndoe:12345@service/api/foo/bar;
    • are credentials good? Ok, you get a 200 OK response with proper body;
    • are they not? You get a 401 Unauthorized response.

    In the latter case, it’s the browser [or any other program / script performing the request] that should prompt the user with the login popup.

    Usually browsers ask you to cache credentials not to ask them every time, but this does not mean that they are not sent – it’s just that every request to protected resources are featured with such header:

    Authorization Basic base64encode(username:password)
    

    Where base64encode is your custom way to encode the username:password string.

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

Sidebar

Related Questions

How can I find out the http request my python cgi received? I need
We have a service hosted behind our firewall that receives request forwarded through to
A urllib2 request receives binary response as below: 00 00 00 01 00 04
I received a request to add around 100 users to a linux box the
I have received a X509 certificate (one .cer file), I can decode it, so
I am currently trying to create a REST web service for my django site
I am wanting to create a synchronous nsurlconnection request. Yes I know its stupid
I have been given some basic documentation of the RazorGator REST API and need
I'm trying to write some python code which can create multipart mime http requests
I have a REST API using Spring. I've created an Interceptor: @Component public class

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.