I have noticed a new error that has just started coming back from SurveyMonkey:
RESPONSE MESSAGE:s:253:"{"error": {"id": "1002", "name": "Bad Request", "docs": "https://developer.surveymonkey.com/api/v3/#error-codes", "message": "Your message is missing the privacy link ([PrivacyLink] or {{PrivacyLink}}). This data is required.", "http_status_code": 400}}";
I'm not sure what this is or why I am getting it all of a sudden. I can't find anything on their api developer documentation. Is this something new? Is this something rolled out without any notification?
Any point in the right direction would be great.
Thanks in advance.
Your body text param should look something like
"body_text": "Thank you in advance for taking my survey. [SurveyLink], [PrivacyLink], [OptOutLink], [FooterLink]"
just make sure you include this [PrivacyLink] and you should be good!
Related
While making access token request from Headers, I'm getting below error.
Error-
{
"error": "unsupported_grant_type",
"error_description": "grant type not supported"
}
Am I doing something wrong or missing something?
Please help!
Attached screenshot-
enter image description here
You used wrong tab.
Headers should be just 1-2:
Content-Type:application/x-www-form-urlencoded
Accept:application/json
Your actual params are supposed to go to the body. Which you can type in manually or in postman's bulk edit syntax it'll be
grant_type:password
client_id:3MVG97sr...
client_secret:CE6C05...
username:example#example.com
password:Hunter2
If you're stuck - edit your question with the postman's "code" output (HTTP or cURL are probably best for wider audience to help you), just edit out the sensitive bits.
P.S. Check https://github.com/forcedotcom/postman-salesforce-apis out. It's bit more work to set the environment variables up, create an account with Postman to fork the repository... But in the long run saves reading documentation and typing all calls by hand.
I am seeing this error from my live server using the Instagram API.
{
"error_message": "Matching code was not found or was already used."
, "code": 400
, "error_type": "OAuthException"
}
I have read a few suggestion on here to clear cache but that isn't fixing the issue. I am also unable to submit a support ticket directly on the Instagram site as I am receiving an error message while attempting to submit a ticket.
I was also facing the same problem. I have tried all the solutions available on the SO. But it didn't work.
When I debugged the that Instagram code in details, I found that Instagram was providing the code something like this after authorization -
AQAbo7gLQMVRqC4NitrEGSj6tPa8UBREsSYDAL7IZcthASbSKaJANrry3HgQnofJuY4nJx9NTuo_eO4SV8ol4-olk0Y4NzhbXkxTw8G9dBq-T3uZuBzRIVJd61LsYHq15tIeDswI82ri6lt7ngc76eoAAAypgGc3cq9DqayVb7oCpfWZEym6KPH_hJMVaoUOAjN9OT1EEtYuUhmUFgJHHEy66ab9LgHZLXiFxugYBkrdKw#_
It started working when I removed the ending 2 charaters #_ from the code.
Below is the final code that I used to get the access_token -
AQAbo7gLQMVRqC4NitrEGSj6tPa8UBREsSYDAL7IZcthASbSKaJANrry3HgQnofJuY4nJx9NTuo_eO4SV8ol4-olk0Y4NzhbXkxTw8G9dBq-T3uZuBzRIVJd61LsYHq15tIeDswI82ri6lt7ngc76eoAAAypgGc3cq9DqayVb7oCpfWZEym6KPH_hJMVaoUOAjN9OT1EEtYuUhmUFgJHHEy66ab9LgHZLXiFxugYBkrdKw
This was a simple solution in my case.
I hope this will help people in case they are still facing this issue.
I am trying to download the items of a shared folder following the v1.0 reference guide. I am able to retrieve the basic details by using the /v1.0/me/drive/sharedWithMe request.
sharedWithMe Response
However when I try and request the contents of the folder using the '/drives/remoteItem.driveId/items/id' request I get a 'itemNotFound' error code.
/drives/b!SuVijei8UUiLXWR4XeJPFe-SS3gbCDVJuXZLcatX7Ikm3BPqZMVJTLOW4rsDD7B2/items/01GB75254SYRXS4C7C25HLIWFMXFY7HWB3
"error": {
"code": "itemNotFound",
"message": "The resource could not be found.",
"innerError": {
"request-id": "2a0591bd-6fdf-4bf8-a5f3-baca24fd1930",
"date": "2016-08-29T14:03:25"
}
Any ideas what is going on?
Thanks!
EDIT:
I was able to retrieve SharedWithMe folders data by using the '/drives/remoteitem.parentReference.driveId/items/remoteItem.id/children'
It seems also very important to use a scope of Files.Read.All (which seems to be currently undocumented)
It looks like you are almost there. All you need is the /content segment.
Expected: /drives/remoteItem.parentReference.driveId/items/id/content
Your actual: /drives/remoteItem.parentReference.driveId/items/id
You'll get redirected to the resource for download. I think the documentation should be updated
And just to make sure, the base url is a bit different:
To get the shared item content: /v1.0/drives/drive-id/items/item-id/content
To get the list of shared items: /v1.0/me/drive/sharedWithMe
I have some questions regarding my REST API that's still in development.
I have the following endpoints:
/users.json: shows a list of all the users
/users/$username.json: shows a single user resource
/posts.json: shows a list of all the posts
/posts/$post_id.json: show a single post resource
A single post resource looks like this:
{"path": "http://api.myproject.com/posts/1.json", "id": 1, "author": "http://api.myproject.com/users/kristof.json", "image": "/images/posts/cxyUzlPo.jpg", "date": "2014-11-09 15:16", "likes": "http://api.myproject.com/posts/1/likes.json", "comments": "http://api.myproject.com/posts/1/comments.json", "likes_count": 0, "comments_count": 0}
As you can see, a post contains a field "author", which defines a hyperlinked relationship to a single user resource.
Now the following problem occurs: I want to build a feed of all the posts created by users. That's easy: I just call the /posts.json endpoint and I have all my posts... But when I want to show the author information about every post, then I would have to make an extra HTTP REST call for every post in the list? That seems very inefficient and bad for performance to me?
Now of course, you can also add the author resource as a nested resource in the list of post resources, but is this still regarded as "RESTful"?
The longer I'm busy building REST APIs (the more I'm learning, obviously), but the more I have to make decisions between "pragmatic REST" and "REST as a religion". :-)
Thanks in advance for any help!
Kind regards,
K.
You can include author information for every post in a call to /posts/ and it's still RESTful. The issue then becomes how to include this information. Please have a look at JSON HAL and read about embedded resources.
I am trying to query the list of projects available to a user with the Asana API as shown in their documentation under the title "Show all projects in a workspace or organization", but I am encountering a 400 Error.
The error message details being returned are:
{
"errors": [
{
"message": "Missing required `team` field"
}
]
}
I am using the following endpoint except that I am using my actual workspace ID:
https://app.asana.com/api/1.0/workspaces/14916/projects
The documentation for this example does not mention a team field, and the only reference to the team field applies to create-only operations. Does anyone have an idea as to what my issue is?
Without having additional information, it sounds like the query might actually be using the wrong HTTP verb - maybe POST? - rather than a GET.
Can you show the exact request you make, how you make it? An example with curl is usually a good common denominator, but code would work as well.