Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 RESTFul API, Develop software by using REST api

views
     
TSbeemek
post Mar 6 2018, 11:59 AM, updated 7y ago

Getting Started
**
Junior Member
143 posts

Joined: Jan 2007
Hi all,
Any one know how to use the REST API ot post the data into server by using json?

hoilok
post Mar 6 2018, 12:06 PM

Regular
******
Senior Member
1,162 posts

Joined: Apr 2007



QUOTE(beemek @ Mar 6 2018, 11:59 AM)
Hi all,
Any one know how to use the REST API ot post the data into server by using json?
*
use fiddler or postman
TSbeemek
post Mar 6 2018, 12:16 PM

Getting Started
**
Junior Member
143 posts

Joined: Jan 2007
QUOTE(hoilok @ Mar 6 2018, 12:06 PM)
use fiddler or postman
*
i tried. but i get status 401 unauthorized
are you programmer?

RookieDaddy
post Mar 6 2018, 06:04 PM

Getting Started
**
Junior Member
160 posts

Joined: Nov 2008


that normally means the REST API need some form of authentication/token. most public REST API will required you to register for an Author-ID/Key and perform a time-limited authentication before allowing you to access the rest of their API...
TSbeemek
post Mar 7 2018, 12:37 AM

Getting Started
**
Junior Member
143 posts

Joined: Jan 2007
QUOTE(RookieDaddy @ Mar 6 2018, 06:04 PM)
that normally means the REST API need some form of authentication/token. most public REST API will required you to register for an Author-ID/Key and perform a time-limited authentication before allowing you to access the rest of their API...
*
Yes. The procedure is like that. But no matter how I connect, I just get not found and unauthorized status.
I suspect they give me wrong url link.
RookieDaddy
post Mar 7 2018, 07:30 AM

Getting Started
**
Junior Member
160 posts

Joined: Nov 2008


while wrong URL is one of the them, there are other possibilities like...
  • web server configuration error
  • authentication failed
  • authenticated ID not authorized to access that REST API
  • access token was not send properly in POST header or JSON
  • access token expired
when I first started with OAuth2 a few years back, I was running around in circles with access token until I started peeking into the network packet to understand what transpired between nodes. haha...
MaGNiFiCo
post Mar 19 2018, 11:10 AM

weeeeeeeeeeeee
******
Senior Member
1,602 posts

Joined: Oct 2005
From: Penang



How about you ask directly to the api provider what is the issue. Start from there.

Since you figure out yourself you had the api key, authentication is ok. That is the major requirement that you already filled in.

I will add another point to @RookieDaddy list.
- Sometimes API provider will whitelist certain ip's only. You might as well check on that smile.gif

 

Change to:
| Lo-Fi Version
0.0111sec    0.27    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 06:47 PM