Firebase Dynamic link API returning unexpected result - rest

I'm using Firebase API to generate short link:
https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=XYZ
It work most of time and generated expected result like https:// abc123.app.goo.gl/WXYZ but randomly it sometime generated https:// goo.gl/xyz sort of link. And finally when this executed by client it does not contain expected parsed result.
I have no idea why this is happening. Any one suggestion what's wrong going here.

Related

Unpermitted fields present in PARAMETER when pulling ad analytics

I get a 403 Forbidden response along with the "serviceErrorCode":100,"message":"Unpermitted fields present in PARAMETER: Data Processing Exception while processing f (truncated...) error when running this get request:
https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&pivot=ACCOUNT&timeGranularity=DAILY&dateRange.start.day=22&dateRange.start.month=09&dateRange.start.year=2020&dateRange.end.day=22&dateRange.end.month=10&dateRange.end.year=2020&accounts%5B0%5D=urn%3Ali%3AsponsoredAccount%3A248XXXXXXXXX&fields=costInUsd,externalWebsiteConversions,impressions,clicks,conversionValueInLocalCurrency&start=0&count=500
I verified that i have the rw_ads and r_ads_reporting permissions.
Anybody know what this could be?
I figured it out. The dateRange is wrong. It needs to be:
dateRange=(start:(day:1,month:9,year:2020))
As Linkedin's API documentation is shit in regards to this it took me a lot of trial and error. I found a partial answer on this stackoverlow post. The final structure is correct but the example isn't. Linkedin's docs say the key is dateRange.start which is wrong.

Apache ManifoldCF: Get a history report for a repository connection over REST API

I'm trying to get a history report for a repository connection over ManifoldCF REST API. According to the documentation:
https://manifoldcf.apache.org/release/release-2.11/en_US/programmatic-operation.html#History+query+parameters
It should be possible with the following URL (connection name: myConnection):
http://localhost:8345/mcf-api-service/json/repositoryconnectionhistory/myConnection
I have also tried to use some of the history query parameters:
http://localhost:8345/mcf-api-service/json/repositoryconnectionhistory/myConnection?report=simple
But I am not sure if I am using them correctly or how they should be attached to the URL, because it is not mentioned in the documentation.
The problem is also that I don't receive any error, but an empty object, so it is difficult to debug. The API returns an empty object even for a non-existing connection.
However it works for resources, which doesn't have any attributes, e.g.:
http://localhost:8345/mcf-api-service/json/repositoryconnectionjobs/myConnection
or
http://localhost:8345/mcf-api-service/json/repositoryconnections/myConnection
Thanks in advace for any help.
I also wrote a message to ManifoldCF team and they gave me an answer. So I summed up it for you below.
Query parameters go after the fixed "path" part of the URL and are of the form ?parameter=value&parameter2=value2...
So in the same way as in any other URL.
The problem was that I didn't supply the activity(s) that I wanted to match. Possible activities are e.g. fetch, process. My example:
http://localhost:8345/mcf-api-service/json/repositoryconnectionhistory/myConnection?activity=process&activity=fetch
Finally, the reason why I didn't get an error when I used a connection name that is bogus is because the underlying implementation is merely doing a dumb query and not checking for the legality/existence of the connection name.

Invalid signature returned when previewing 7digital track

I am attempting to preview a track via the 7digital api. I have utilised the reference app to test the endpoint here:-
http://7digital.github.io/oauth-reference-page/
I have specified what I consider to be the correct format query, as in:-
http://previews.7digital.com/clip/8514023?oauth_consumer_key=MY_KEY&country=gb&oauth_nonce=221946762&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1456932878&oauth_version=1.0&oauth_signature=c5GBrJvxPIf2Kci24pq1qD31U%2Bs%3D
and yet, regardless of what parameters I enter I always get an invalid signature as a response. I have also incorporated this into my javascript code using the same oauth signature library as the reference page and yet still get the same invalid signature returned.
Could someone please shed some light on what I may be doing incorrectly?
Thanks.
I was able to sign it using:
url = http://previews.7digital.com/clip/8514023
valid consumer key & consumer secret
field 'country' = 'GB'
Your query strings parameters look a bit out of order. For OAuth the base string, used to sign, is meant to be in alphabetical order, so country would be first in this case. Once generated it doesn't matter the order in the final request, but the above tool applies them back in the same order (so country is first).
Can you make sure there aren't any spaces around your key/secret? It doesn't appear to strip white space.
If you have more specific problems it may be best to get in touch with 7digital directly - https://groups.google.com/forum/#!forum/7digital-api

PayPal Rest API date filtering not working. What am I doing wrong?

I am using the ruby paypal rest api and everything I do seems to be right but PayPal keeps saying my date format is incorrect.
Here is my call:
Payment.all(:start_time => '2013-03-06T11:00:00Z', :end_time => '2013-03-06T11:00:00Z')
After many attempts I literally took the date example in the documentation: https://developer.paypal.com/webapps/developer/docs/api/
Because no matter what I do I keep getting the same response:
'{"name":"VALIDATION_ERROR","details":[{"field":"start_time","issue":"Must
be a date_time string of form yyyy-mm-ddThh:mm:ss(.sss)?Z"},{"field":"end_time","issue":"Must
be a date_time string of form yyyy-mm-ddThh:mm:ss(.sss)?Z"}],"message":"Invalid
request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"dcd8a9ce6a5e7"}'
Am I blind or does it not make sense?
Looks like it's a bug in our API where it's expecting raw value rather than url encoded value. The SDK was always url encoding the value of the start_time and end_time (or as a matter of fact all url parameters as per the HTTP spec). We have filed a bug and get this fixed as soon as possible. Meanwhile if this is something you need to work, we can possibly make the SDK not url encode the params or you can just modify the code for now locally.
I think your issue might be that you're setting both the start time and the end time to the same exact value. If you want a single day's worth of transactions the end time would be 2013-03-06T23:59:59Z.

fields parameter not working with graph batch requests

I have moved my graph requests to a batch, and noticed that when more than one request parameter is passed, the request fails with error 400.
For example, this works when not batched:
facebook->api('/me/friends?limit=5000&fields=id')
But when the same graph url is moved to a batch request, I get a 400 error.
When I remove one of the parameters (either fields or limit), it works:
/me/friends?fields=id
/me/friends?limit=10
Anyone knows if this is a bug or should be like this for some reason?
Finally found the answer to my problem. It appears that the & char must be escaped with %26 in order for this to work.
So my code sample should be:
facebook->api('/me/friends?limit=5000%26fields=id')
Wish this was documented...