Giter VIP home page Giter VIP logo

Comments (17)

moremorefor avatar moremorefor commented on June 3, 2024

I also got same error when to use curl command.

And, when I try to get access_token in sample ios app,
I got an token_expired status at any time like below.
【response】
{
"pkg": null,
"status": "token_expired",
"error": "request token expired",
"url": "http://avosapi.delicious.com/api/v1/oauth/token?client_id=02e1bdf1a60c6dedc37bbc75eff8fbc2&client_secret=37fea84bf70a9212c6961a7889551d2a&redirect_uri=http://www.example.com/redirect&grant_type=code&code=3ada86733159708c9b4149f3b9defa2d",
"delta_ms": 5,
"server": "api4-del",
"session": "v4jyui3m0pglohky91npviny",
"api_mgmt_ms": 0,
"version": "v1",
"access_token": null
}

from delicious-api.

smurfpandey avatar smurfpandey commented on June 3, 2024

I am also getting the same error. Documentation is not clear, if we have to make request using GET or POST method

from delicious-api.

spaceyjase avatar spaceyjase commented on June 3, 2024

To confirm, it has to be a POST request. The HTTP error code is described in the OP:

'Request method 'GET' not supported'

...it works via POST. See your language (or command line tool, etc) documents for guidance.

Another post talks about an expired code; this is different as the code you're trying to exchange has expired and you need to retrieve a new one (i.e. begin the OAuth process again). Perhaps the code you're using is hard-coded or something?

from delicious-api.

smurfpandey avatar smurfpandey commented on June 3, 2024

Request data will be in JSON format?

from delicious-api.

spaceyjase avatar spaceyjase commented on June 3, 2024

That's correct :)

Shown here:

https://github.com/avos/delicious-api/blob/master/api/oauth.md

{
"status": "success",
"delta_ms": 74,
"server": "del-api-test",
"session": "iteqcp5llxi5ulw2hzqy3uo",
"api_mgmt_ms": 0,
"version": "v1",
"access_token": "7421140-262ce921d8572ab75031bfb505e46a1c"
}

from delicious-api.

moremorefor avatar moremorefor commented on June 3, 2024

I'm using POST request.

My case, expiring is every time.
And, client_id and client_secret is only hard-coded.
I get request_token every time.

(main)> "Authorize_URL: https://delicious.com/auth/authorize?client_id=02e1bdf1a60c6dedc37bbc75eff8fbc2&redirect_uri=http://www.example.com/redirect"

"request_token_code: e3858b7ce98c89e0ecc6a9246d454f07"

"requestAccessTokenWithCode: https://avosapi.delicious.com/api/v1/oauth/token?client_id=02e1bdf1a60c6dedc37bbc75eff8fbc2&client_secret=37fea84bf70a9212c6961a7889551d2a&redirect_uri=http://www.example.com/redirect&grant_type=code&code=e3858b7ce98c89e0ecc6a9246d454f07"

 "string: {\"pkg\":null,\"status\":\"token_expired\",\"error\":\"request token expired\",\"url\":\"http://avosapi.delicious.com/api/v1/oauth/token?client_id=02e1bdf1a60c6dedc37bbc75eff8fbc2&client_secret=37fea84bf70a9212c6961a7889551d2a&redirect_uri=http://www.example.com/redirect&grant_type=code&code=e3858b7ce98c89e0ecc6a9246d454f07\",\"delta_ms\":5,\"server\":\"api2-del\",\"session\":\"1xkt5znu5rvywl4g72wqw5gqk\",\"api_mgmt_ms\":0,\"version\":\"v1\",\"access_token\":null}"


(main)> "Authorize_URL: https://delicious.com/auth/authorize?client_id=02e1bdf1a60c6dedc37bbc75eff8fbc2&redirect_uri=http://www.example.com/redirect"
...
...same result

Do you have any other cases it expires?

from delicious-api.

spaceyjase avatar spaceyjase commented on June 3, 2024

I don't, no... just from personal experience. I'm not affiliated with Delicious either, just so that's clear :)

While the API docs says 'redirect_uri' is required, I found that it isn't (the example is also missing the parameter). The URL I use in my app is:

https://avosapi.delicious.com/api/v1/oauth/token?client_id={0}&client_secret={1}&grant_type=code&code={2}

...where {0}, {1} and {2} are provided in code. You could try dropping the 'redirect_uri'?

Hope that helps.

from delicious-api.

zmanring-zz avatar zmanring-zz commented on June 3, 2024

Hi all, is anyone experiencing...
GET https://delicious.com/js/controllers/oauth_controller.js 404 (Not Found)

I am trying to run it in my extension and I got as far as requesting the Auth from https://delicious.com/auth/authorize but stops there, in the logs I am receiving the 404 form require.js.

Any help would be deeply appreciated.

from delicious-api.

thiagopbueno avatar thiagopbueno commented on June 3, 2024

I finally did get my access_token!

If there's still anyone in this situation, it may help to say that it worked for me using the grant_type=credentials as described in https://github.com/SciDevs/delicious-api/blob/master/api/oauth.md#parameters-1 and using the poster Firefox plugin for issuing the post request ...

from delicious-api.

jamesxv7 avatar jamesxv7 commented on June 3, 2024

This article help me to find my token.

from delicious-api.

moszeed avatar moszeed commented on June 3, 2024

@zmanring same issue here, is there a solution around for this ??

from delicious-api.

zmanring-zz avatar zmanring-zz commented on June 3, 2024

@moszeed, I ended up getting away from using oAuth. In my implementation as a chrome extension, the callbacks dont quite work the way they should :/. If you know a better way, I would be open to suggestions.

from delicious-api.

peoplemerge avatar peoplemerge commented on June 3, 2024

Could you guys post a sample cURL?

from delicious-api.

jamesxv7 avatar jamesxv7 commented on June 3, 2024

@zmanring and @moszeed Im having issues with oAuth since January 8, 2015. I would like to confirm if I'm the only one with problems or if there is something wrong with the oAuth implementation of the API.

from delicious-api.

moszeed avatar moszeed commented on June 3, 2024

@peoplemerge just use the example from here https://github.com/SciDevs/delicious-api/blob/master/api/oauth.md

from delicious-api.

amirsedghi avatar amirsedghi commented on June 3, 2024

We have a surgical fix. Can you guys try it now.

from delicious-api.

jamesxv7 avatar jamesxv7 commented on June 3, 2024

@amirsedghi For me is working right now.

from delicious-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.