Newsletter2Go endpoint /forms/submit{{form_id}} - newsletter2go

I created a wrapper for using the newsletter2go endpoint
https://api.newsletter2go.com/forms/submit/{{form_id}}
When I post the request to that ep w/ an form_id I get the following response:
http status: 400
code: 10020
error message: Bad Request (invalid code xxxx)
Im using the id from the n2go backend:
Can anyone tell me whats about the error code 10020? The api docs containing nothing about that.

This is probably because you used big letters in your form_id. I had the same problem. The support told me, that only small letters are allowed.

I found finally out what the form_id have to be. It's the value you see in the Opt-In Email for the n2g argument, for example:
https://subscribe.newsletter2go.com?n2g=dummy-code-here
Otherweise check the sourcecode of the Embedded Form, there is a script in it which contains the form id.
Maybe this helps someone one day.

Related

HPP Incorrect hash

I send a request to the sandbox to "Pay By Link".
URL: https://pay.sandbox.realexpayments.com/pay
I get an error in response.
{"errors":[{"resultCode":508,"internalErrorCode":61000,"errorMessage":"Incorrect hash. Please check your code and the Developers Documentation."}]}
The hash is calculated correctly (the values obtained through the SDK and calculated manually are the same).
This is possible with the wrong shared secret.
I use the values of the MerchantId and the SharedSecret in my account on the https://developer.globalpay.com/gp_api_credentials/
(My Account->Ecomm API Credentials->Sandbox Credentials)
How to fix the error?
Can i change the "Ecomm API Credentials->Sandbox Credentials" ?
The server reply is often completely wrong, so don't believe the error message it tells you. Remove all optional config field values (such as CardStorageEnabled) and try again. Then it should work, and after that you can re-enable the optional fields one by one to see which one causes the error.

YouTube Analytics API Reports query: 400 bad request

As a content owner I would like to retrieve reports by using the reports.query method in the YouTube Analytics API. When I execute the request the error is: badRequest with the message The query is not supported. Code 400.
I fill in the following fields:
ids: contentOwner==MyContentOwnerId
start-date:2017-08-01
end-date:2017-08-10
metrics:views
Why do I receive the 400 error? Thanks for your time!
Robert
I tried your query and I got the same bad request error, however when I filter it down to the video level it provides me with the information I needed.
ids: contentOwner==ContentOwnerId
start-date: 2017-08-01
end-date:2017-08-10
metrics:views
dimension:day
filter:video==videoId
Hope this helps!

Magento Valid url redirects to 404

I am facing some issue with product url. Url seems to look fine but some times it's get redirected to 404 and the url-key value in address bar is getting replaced with 'null'.
I am not able to find any clue why its happening.
Can you any body suggest proper method to debug such issue?
Thank You.
This is basically URL rewrite issue. Check if the url rewrites are enabled: System> Configuration > Web > Search Engine Optimization > Use Web Server Rewrites.
And if the problem still persists do check your exception.log file
I'm aware this is a 2 year old post, but I had this issue today...
all previously valid product urls got a 404 error
after a lot of failed attempts of figuring out what was going on I asked someone to take a look, to which they replied: Err, What's wrong? ...
apparently everything was fine, but my own user's session/cookie had bad data, or something.
Removing the bad cookie fixed this.
I have no idea specifically what it was because I did not think of keeping a backup of the bad cookie/session data to investigate.
But I'm guessing it had something to do with my session's customer id or user id
Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]:
General error: 1032 Can't find record in 'report_viewed_product_index',
query was: INSERT INTO `report_viewed_product_index`

Best way to read JSON strings from Instagram API with R

I tried different approaches so far including fromJSON(readLines(url),unexpected.escape="keep")
and fromJSON(getURL(url),unexpected.escape="keep").
The thing I stumbled upon now is that if my request looks as follows:
url = "https://api.instagram.com/v1/users/142121981/?client_id=****************************"
(fill in your clientid) combined with readLines(), which has worked better for me so far, I recieve the error:
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") : cannot open: HTTP status was '400 BAD REQUEST'
If you open this URL in your browser u still get a JSON atring:
{"meta":{"error_type":"APINotFoundError","code":400,"error_message":"this user does not exist"}}
Telling me, that a user with this ID doesnt exist.
What I want is a alternative to readLines() that still reads in this JSON string instead of throwing an error.
Hope this is explanation enough! If not ask me anything you need to know!
Thanks to the tips by MrFlick I dived into the httrpackage.
The solution for me (or best practice) is to use
response = fromJSON(rawToChar(GET(url)))
This gives back an R object even if the user doesnt exist.
I use RCurl, httr & RJSONIO packages and:
fromJSON(getURL()))

bungie.net stats api

Has anyone tried accessing bungie.net reach stats api (statistics from Halo Matchmaking)?
As described here http://www.bungie.net/fanclub/statsapi/Group/Resources/Article.aspx?cid=545064
I can't seem to get any data returned, for example if i use this (with correct API key and gamertag values of course) ignore the first 2 asterisks ...
**http://www.bungie.net/api/reach/reachapijson.svc/player/details/byplaylist/MyIdentifierAPIkey/Gamertag
I don't receive a response - but no errors either, am i doing something wrong?
looking to use this for a Titanium (appcelerator) app eventually.
Any help or advice welcome, thanks in advance.
Unfortunately the API is not yet live to the public. I asked in a Private Message. They didn't say when it would be live.
In the Docs that Achronos posted, he put spaces in the URL's, I'm not sure if those are supposed to be there or not, so I tried it with the spaces and I got a 403 Forbidden error page. When I remove all the spaces, I get an error page that says:
Request Error
The server encountered an error processing the request. See server logs for more details.
I kinda can't check the server logs though... Bungie did say they were having some issues with the site though, so this might be a biproduct of that. I want them to get it working soon though, I wanna see just what it can do!