I'm using the checkins/CHECKIN_ID API to retrieve data about a specific checkin. There isn't the photo object even if it should be always present, if the user has taken it... Is it a current issue or am I in error?
Are you sure the check-in you are inspecting has a photo? If the creator of the check-in has not taken a photo, it will not be present in the response. Also, make sure that the API request is being made from a user account that is able to see the check-in.
Related
Issue 1 - Now I am using Code Grant and fetched token with refresh token, still it is not working, next day when I am using same token generated with refresh_token is giving error
Issue 2- How can I get uri or path of that file - so that user can click that link - view status - download ?
like https://demo.docussing.com/accountid/envelopeid/documentid some thing like this, once user click on that page it will open that page showing current state of document
StackOverflow is best used as one-topic-per-question. When asking, it's best to provide as much detail as possible about what you're doing, what's wrong, what errors are received, and what you've tried to do to investigate.
For issue 1, access tokens last for eight hours, so when an access token expires you will need to generate a new one. Based on your question, I'm not sure that's happening - Are you able to use the refresh token to generate new access token, or is that what's failing?
For issue 2, there are a few ways to approach. First, your application could directly download the PDF of the envelope (https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopedocuments/get/) and display that. If you would like to take the sender to a DocuSign interface to allow them to view the envelope, there are various Recipient View calls that may be of use: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/
I would recommend testing the SenderView call to see if that meets your needs. An alternative would be the RecipientView call, which can be used with the sender's name and email in the call body to get to a read-only view of the envelope.
We are using SharePoint client object model (CSOM) and REST/OData endpoints to retrieve/manage data on sharepoint.
Is there anyway to get information on the user performing the MOVE on a file (for example, move file from folder A to folder B within same site collection)? When I use this REST API call before and after the move, Author and Editor remains the same even though a completely different user moved the file from folder A to folder B. SPChangeItem does not seem to have any members with this information either.
https://{site_url}/_api/web/GetFileByServerRelativePath(DecodedUrl=#fileUrl)?$expand=Author,ListItemAllFields,ListItemAllFields/ParentList,ListItemAllFields/ParentList/ParentWeb&$select=UniqueId,Author/LoginName,Author/Email,Author/Id,Editor/LoginName,Editor/Email,Name,UserName,ServerRelativeUrl,MajorVersion,MinorVersion,Length,ListItemAllFields&#fileUrl={url_encoded_file_path}
Is there anyway to get logged in user while using REST API?
When I use this REST API call, Id returned is the user corresponding to Bearer accesstoken.
https://{site_url}/_api/Web/CurrentUser?$select=Id
When moving a file to another folder, the metadata including author/editor is remained the same one, what changed is only the location. This is by designed.
If we want to know the user who performed this operation, we could check the version events of the file as it will immediately prompt an modification event when moving a file.
FileVersionEvent
Rest API endpoint:
_api/Web/GetFileByServerRelativePath('filepath')/VersionEvents
Thanks
I was using the following api to get the latest 3 posts from public accounts to show on the website:
https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id={client-id}&count=3
I had created an app to get the client-id.
However from today, this API has started throwing the following exception:
{
meta: {
error_type: "OAuthAccessTokenException",
code: 400,
error_message: "The access_token provided is invalid."
}
}
Could you please let me know as how to resolve this?
Based on the date, you probably have an older app that got hit by the API migration today, like mine. In short, Instagram decided to make developing for their platform WAY more annoying by requiring all API requests to be authenticated per user, even for data that users shares publicly. So you (like me) will likely be redesigning you app entirely.
To tell, log in to instagram.com/developer and click manage clients; then hit edit next to the set of keys your're trying to use. Up near the top, it will have a section called 'Client Status' -- if yours reads 'Sandbox Mode', fun times ahead! Hopefully you interact with less than 10 users and can stay in sandbox mode, otherwise you'll have to write an essay, film a video, and basically plead to get your permissions back (probably in a few months, when some Instagram intern finally digs his way down to you in the pile of applications). If it reads something eles, you've got another problem altogether and should thank your lucky stars.
In the meantime, I guess I'll get back to sending out dozens of emails to the maintainers of our many, many affiliated Instagram accounts to explain the issue and try to get permissions, so provided we get approved by then, all our social media displays aren't broken during a huge event Saturday. Another option might be to use the OAuth-less json response available here, but that might break terms of service.
I have a solution to this. If you are using the same code I am, which appears likely. I was pulling the last two images using this.
https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id={client-id}&count=3
What I did to get this working is the following.
Login to your Instragram account you are using as the application.
Go to the developer (API) area. https://www.instagram.com/developer/clients/manage/
Manage clients. Make sure your website URL is the same as your valid redirect URL.
Add new Sandbox User. Put in the account of the IG photos you want to reach.
Hit this URL: https://api.instagram.com/oauth/authorize/?client_id=CLIENTID&redirect_uri=REDIRECT_URI&response_type=token where the client ID is the same one you used in your previous app above.
You should get back and access token URL. Copy your access token.
Login as your account that you want the IG photos of. The account you added as a sandbox user and go to developer and approve the Sandbox Invites.
Change your original URL above from https://api.instagram.com/v1/users/{user-id}/media/recent/?client_id={client-id}&count=3 to https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS_TOKEN with your access token.
This is the IG API Media endpoint documentation: https://www.instagram.com/developer/endpoints/users/
After that, it all worked for me and while you are in the sandbox, you should be able to pull the last 3 photos or at this point, figure out how to read the JSON to do so.
Has your app been approved after the June 1st Instagram platform changes?
http://developers.instagram.com/post/145262544121/instagram-platform-update-effective-june-1-2016
If you want to retrieve the user media file then try this, It's working for me
https://graph.instagram.com/me/media?fields=id,caption,media_url,media_type&access_token=ACCESS_TOKEN
For some reason the token is no more valid. Request it again.
Possible reasons why a token is no more valid:
changed password
verified the account
logged-in from a different country
I'm trying to get medida data from Instagram via their REST service. I've got an access token and tried to get some media data, I'm using this query
https://api.instagram.com/v1/users/184692323/media/recent/?access_token=
I get this response
{"meta":{"error_type":"APINotFoundError","code":400,"error_message":"this user does not exist"}}
The user ID does exist, I actually tried to use Lady Gaga's user ID, which I got from here: http://jelled.com/instagram/lookup-user-id#
When I use my user-id, it works. It just seems to not work with other user ids.
What can I do? Is this something related to these new "sanbox" rules?
I think you are still running in Instagram Sandbox-mode: https://www.instagram.com/developer/sandbox/.
Citing their page: For example, if you query the /users/{user-id}/ endpoint and the {user-id} is a sandbox user, then you will get the normal API response; but if the {user-id} is not a sandbox user, you will get a APINotFound error.
I have the same issue for non-Sandbox users, which are public but nevertheless Instagram returns it's not a valid user. So the docs seem to be correct.
the user exits, but you may be blocked by instagram for spamming, usually you get that response if spam was detected by an account, try with different user access_token, it should work.
I am very late but you need to invite the user in your application's sandbox and he needs to accept your invitation to actually get any information out of it.
In addition to what Dennis said,
You need to submit your App for review if you're doing things with public profiles. It's not super complicated, but you'll need to build an actual use case for them to approve your app out of sandbox mode.
Or, you can add the users you want to play with to your sandbox app.
I have real time subscription for really popular tag.
My app gets many subscription calls in second and then i am making post request to tag/media/recent, but i am getting duplicate and skipped images because it is very fast. How can i get sure that i request for image that subscription call is sent?
I tried even to set count to 1, and store last min_tag_id, but i am getting duplicates and missed images also.
my idea was to get last picture id, then on subscription call to set sleep for sometime and then call tag/media/recent with count=1 and min_tag_id and i will get picture for that subscription call, but there are still duplicates.
Why Instagram is not simply sending picture ids?
I have been having the same issue as you (working on this over the last week). My workaround, currently, is after Instagram sends a POST that an update for the hashtag has happened, I do a POST call for the most recent photos (currently setting count to 1 as you're doing but still working on getting all the newest photos).
I basically store all the latest photos returned in a database using the photos id as the primary key. If the key already exists in the db I issue an update otherwise the new photo gets inserted into the database. I then check whether an update was called or an insert was called. If an update, I simply exit the function. If an insert was called, I then issue a response to the browser with the new photo (this is very easy to do with web sockets; alternatively you can simply poll your database over a set interval to check if new photos were added).
I'm not even sure if this is a correct approach, it feels very hacky to me but Instagram's real time API is not very intuitive to work with.