I am facing this problem while trying to use FourSquare API with iPhone.
I am doing OAuth initially for getting tokens. So, now I have my application's client id & client secret. And oauth token & oauth token secret for the user. I am using this:
https://github.com/jdg/oauthconsumer
However, I am not sure how to proceed from here to calling the APIs. I mean, if I do this -
https://api.foursquare.com/v2/venues.json?geolat=-78.695548&geolong=35.767138&l=10&oauth_token=OAUTH_TOKEN
I am getting this reply:
{"meta":{"code":401,"errorType":"invalid_auth","errorDetail":"OAuth token not found or has been revoked."},"response":{}}
Can anyone please tell me what am I doing wrong here ?
Thanks.
-
ahsan
Please try this sample code and intgrate it in your code to get the correct access token
https://github.com/drewvergara/Foursquare-OAuth-iPhone
Related
My DocuSign App failed the "Go Live Review" due to me not using OAuth 2.0 authentication.
I have now read the documentation on how to "Get an access token with JWT Authentication" below:
https://developers.docusign.com/platform/auth/jwt/jwt-get-token/
Following this documentation I am able to get the JWT using jwt.io as suggested.
The Verified Signature code from jwt.io is then used to exchange for an DocuSign access_token using POSTMAN.
All this works as expected.
After some time the Verified Signature optained from jwt.io expires and calling https://account-d.docusign.com/oauth/token from POSTMAN results in this error:
{
"error": "invalid_grant",
"error_description": "expired_grant"
}
To fix this, I simply go to jwt.io and update the Payload section with new values for "iat" and "ext" and a new Verified Signature is obtained and copied in to POSTMAN for new request of access_token.
My question:
How to solve this expiring issue as DocuSign endpoint does not provide a refresh_token ?
It must be possible to somehow "renew" the Verified Signature as DocuSign endpoint requires this updated value for the field : "assertion" in POSTMAN.
I have tried to construct the three values separated by a period in the Verified Signature manually by base64 encoding, but I can´t figure out how to get the final RSASHA256 value in the Verified Signature.
I have seen the documentation for "Migrate to OAuth 2.0 using the DocuSign eSignature C#SDK" on this link :
https://developers.docusign.com/platform/auth/oauth2-requirements-migration/
Please note that I am not a developer and maybee the solution to my question is obvious for real developers - but I need a bit of help to solve this as I do not work in development-tool as shown on the video.
Please help...
How to solve this expiring issue as DocuSign endpoint does not provide a refresh_token?
The best is to create a new JWT for each OAuth call to DocuSign--and use software, not a website, to do so.
Note: Only obtain a new access token (by sending a fresh JWT) when the old access token has expired or is about to expire.
The DocuSign SDKs include functions to create a JWT. All of the SDKs are open source, so if you don't want to use the SDK as a whole, you can copy out the functions' implementations.
This would depend on what language your app is written in or what kind of tool it's built on. Generally, most programming languages have libraries that can generate the JWT for you without having to use jwt.io manually.
Does your app only make API calls via postman? This post might be helpful for you. It shows how to set up a pre-request script to generate the JWT
I'm having trouble generating toke access with jwt docusign documentation is very confusing. Does anyone have an example in nodejs.
I already got an example in the directory but it's presented a lot of error.
https://github.com/docusign/code-examples-node
Does anyone have an example I can follow?
I am trying to call transaction rooms APIs.
I have followed all steps related to generating a token and i am sure 100% that
I have a correct token and refresh token.
This token which I use for cartavi APIs rooms and other endpoints but I always get Unauthorized access token.
Does anyone have the same issue?
Thanx in advance.
You would have given wrong scopes in the intitial OAUTH url call. DTR has different scopes and the scope(s) which is present on the DS ESign API docs will not work to call DTR APIs.
I´m trying my self with the Instagram API, but I can´t understand the whole acces_token thing.
I understand that it is for authorization to access information, but why is it so so hard to get a token to get public information ?
For example with facebook you just need a profile to get your personal access_token and with that you can gather information. Why is this not possible with Instagram or is there a way to get a access token that has public_content as a scope ?
I would like to have it seperate from my profile ofc. It is possible with Facebook that easily and it´s basicly the same company.
And for example it´s possible to combine the App-ID & App Secretcode to use it as a access_token. Is this possible with Instagram ?
Am I missing something ?
Thanks for your help !
I just wanted to use webapi to play with the metadata like playlist, artists on my own account. Is it possible to do that by REST API without using /callback to web application which receives authorization code then can get the oauth token ?
I have researched here:
https://developer.spotify.com/web-api/authorization-guide/
Then I found:
https://developer.spotify.com/web-api/authorization-guide/#client-credentials-flow
That's it! You just need to get oauth token by giving your regular login and password credentials.