I keep getting 403 from Intuit AggCat API in response to all requests except getInstitutions and getInstitutionDetails (they return correct data). Has anyone else experienced that?
Ruby code excerpt:
IntuitIdsAggcat.config(:issuer_id => "...")
IntuitIdsAggcat.config(:oauth_consumer_key => "...")
IntuitIdsAggcat.config(:oauth_consumer_secret => "...")
IntuitIdsAggcat.config(:certificate_path => "...")
IntuitIdsAggcat::Client::Services.delete_customer '1'
IntuitIdsAggcat::Client::Services.discover_and_add_accounts_with_credentials 14007, 1, { "onlineID" => "...", "passcode" => "..." }
IntuitIdsAggcat::Client::Services.get_customer_accounts 1
Response:
{:challenge_session_id=>nil, :challenge_node_id=>nil, :response_code=>"403", :response_xml=><UNDEFINED> ... </>}`
I am using https://github.com/rewardsummit/intuit_ids_aggcat
The documentation for that response code is located [here]: https://ipp.developer.intuit.com/index.php?title=0010_Intuit_Partner_Platform/0020_Aggregation_%26_Categorization_Apps/AggCat_API/0700_Error_Codes
It looks like the users credentials either changed or they are locked.
regards,
Jarred
Related
I am busy with a angular4 web app that uses the youtubeInMp3 API. Everything works as it should when downloading mp3 files using the API however it doesn't work for all videos, I'm not sure which videos give the issue, I've noticed that it often happens when the YouTube video ID contains the _ character. when it does I get the below error... I know that the issue isn't with the video as it works when I test it http://www.youtubeinmp3.com I've tried urlEncoding the id before passing it to the API, replacing _ with - and replacing _ with %20 with no success. Any idea what might be going wrong here/how I can go about fixing it?
My error (from chrome developer console)
core.es5.js:3046 Angular is running in the development mode. Call
enableProdMode() to enable the production mode.
main.bundle.js:368 id: t0sS60Jx51c main.bundle.js:788 url
main.bundle.js:789
http://www.youtubeinmp3.com/fetch/?format=JSON&video=https://www.youtube.com/watch?v=t0sS60Jx51c
main.bundle.js:376 SyntaxError: Unexpected token < in JSON at position
0
at Object.parse ()
at Response.Body.json (vendor.bundle.js:37736)
at MapSubscriber.project (main.bundle.js:791)
at MapSubscriber._next (vendor.bundle.js:22171)
at MapSubscriber.Subscriber.next (vendor.bundle.js:242)
at XMLHttpRequest.onLoad (vendor.bundle.js:38165)
at ZoneDelegate.webpackJsonp.576.ZoneDelegate.invokeTask (polyfills.bundle.js:2496)
at Object.onInvokeTask (vendor.bundle.js:5501)
at ZoneDelegate.webpackJsonp.576.ZoneDelegate.invokeTask (polyfills.bundle.js:2495)
at Zone.webpackJsonp.576.Zone.runTask (polyfills.bundle.js:2263)
When I make this request that gives me an error in the insomnia REST client I get the following response:
metahttp-equiv="refresh" content="0" url="http://www.youtubeinmp3.com/download/?video=https://www.youtube.com/watch?v=t0sS60Jx51cautostart=1n=x="
An example of a response successful request to the youtubeInMp3 Api, the id logged in the console is the YouTube video id:
id: bjLorSJAB70 main.bundle.js:788 url main.bundle.js:789
http://www.youtubeinmp3.com/fetch/?format=JSON&video=https://www.youtube.com/watch?v=bjLorSJAB70
main.bundle.js:371 Objectlength: "199"link:
"http://www.youtubeinmp3.com/download/get/?i=fOzuoPTm06oBoLw3aidWejXF7Yc2JB3T&e=33"title:
"Santo Daime EU CHAMO A CURA"proto: Object main.bundle.js:373
http://www.youtubeinmp3.com/download/get/?i=fOzuoPTm06oBoLw3aidWejXF7Yc2JB3T&e=33
My code:
//function that passes the video id to a restService for downloading:
download(id: string) {
console.log("id: " + id);
this.restService.yDownload(id)
.subscribe(
(res) => {
console.log(res);
let url = res.link;
console.log(url);
window.location.href = `${url}target="_blank"`;
}, (res) => {
console.log(res)
});
}
//rest service function for getting the download link from youtubeInMp3 api
yDownload(id: string) : Observable<any> {
let params = [
`format=JSON`,
`video=https://www.youtube.com/watch?v=${id}`
].join('&');
let queryUrl = `${this.Y_DOWNLOAD_URL}?${params}`;
console.log("url");
console.log(queryUrl);
return this.http.get(queryUrl)
.map((res: Response) => res.json())
.catch((err: any) => Observable.throw(err || 'server error'));
}
I'm using Loopback and
I'm trying to user auth for graph api without javascript sdk or passport
I got the code successfully however I can't exchange it with access token
I followed this guide https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/#confirm
my get request is https://graph.facebook.com/v2.7/dialog/oauth?code={xxxx}&client_secret={xxxx}&client_id={xxx}&redirect_uri={myURL}
myURL is the one used to get the code but not be used again if I understand
If I understand correctly I should it the access_token in the body of the response instead I get this error
{
"error": {
"message": "Unknown path components: /oauth",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "HXe+214tGpW"
}
}
It looks like a bug in the docs. The first call is to www.facebook.com in a browser.
See here for an example client https://github.com/yschimke/oksocial/blob/master/src/main/java/com/baulsupp/oksocial/services/facebook/FacebookAuthFlow.java
The second should be to something like https://graph.facebook.com/v2.7/oauth/access_token
$response = $fb->sendRequest(
'GET',
'/oauth/access_token',
[
'client_id' => $config['client_id'],
'client_secret' => $config['client_secret'],
'grant_type' => 'fb_exchange_token',
'fb_exchange_token' => $short_token
],
$short_token,
null,
'v2.7');
My web app was working great on sandbox. I changed all of my requests from https://sandbox-api.uber.com/v1/... to https://api.uber.com/v1/... and now I'm getting an error I've never seen before.
Here are the details of the error:
Status: 409
Code: fare_expired
Title: The fare has expired. Please get estimates again, confirm the new fare, and then re-request.
I can't find any documentation on Uber's site on this specific error. I know that surge pricing acceptance can expire and have to be reauthorized, but I'm getting this error on the very first ride request.
Has anybody else seen this error? Happy to share more details as needed.
This is my ruby code where I make the ride request to Uber:
#uber_ride = JSON.load(RestClient::Request.execute(
:method => :post,
:url => "https://api.uber.com/v1/requests",
:payload => '{"start_latitude":' + lat_start.to_s + ',"start_longitude":' + lng_start.to_s + ',"end_latitude":' + lat_end.to_s + ',"end_longitude":' + lng_end.to_s + ',"product_id":"' + #uberx_id.to_s + '","surge_confirmation_id":"' + surge_id.to_s + '"}',
:headers => {'Authorization' => 'Bearer ' + session[:request_token], :content_type => 'application/json'}
))
The way I resolved this error was by hitting the /V1/ESTIMATES/PRICE endpoint BEFORE the request endpoint. I think this error message stems from Uber wanting you to present an estimated price to the user before submitting a request on their behalf.
How would I save the "secret token" as a cookie before redirecting so that I can retrieve it later?
#Mustafa Simav's answer is correct. Everything strangely started working when I cleaned my project (deleted sbt generated files)
First of all, I don't now details of OAuth so I am not sure whether it is good idea to store token on cookie or not. However if you want to store and retrieve cookie with spray, you can do it like this:
val routes =
path("redirect") {
setCookies(HttpCookie("random_token", random_token)) {
redirect("twitter.com/authorize", Found)
}
} ~
path("get-cookie") {
parameters('token) { token =>
optionalCookie("random_token") {
case Some(random_token) if random_token == token => complete("OK")
case _ => complete("Error", BadRequest)
}
}
}
PS: Don't forget to concatenate routes with ~
I am trying to GET some RESTful services using the api located at https://api.mmitnetwork.com
If I make a GET request it gives me a 401 error Unathorized. In order to authenticate using their api I am suppose to make a POST to https://api.mmitnetwork.com/Token with
{"grant_type":"password", "username":"yourusername","password":"yourpassword"}
in the body get a token.
How would I do this in react?
You can use axios: https://github.com/mzabriskie/axios
axios.post(' https://api.mmitnetwork.com/Token', {
grant_type: 'password',
username: 'yourusername',
password: 'yourpassword',
}).then((response) => {
console.log('success!')
}).catch((error) => {
console.log('something went wrong :(')
})