get Access token in foursquare - foursquare

I want to get access token foursquare like this link `https://developer.foursquare.com/overview/auth#userless' and this is code
https://foursquare.com/oauth2/access_token
?client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET
&grant_type=authorization_code
&redirect_uri=YOUR_REGISTERED_REDIRECT_URI
&code=CODE
I don't understand what YOUR_CLIENT_ID,YOUR_CLIENT_SECRET and YOUR_REGISTERED_REDIRECT_URI are. Can you explain and show some examples ? Thank you very much for helping.

"Before you get started, you should create an app on Foursquare. This will give you a client ID and client secret which are needed for using the API. The documentation in this guide is meant to give a high-level conceptual overview of the Foursquare platform, help you grok its different parts and capabilities, and get started using the API’s most popular features."
https://developer.foursquare.com/start

Go to the link: https://foursquare.com/developers/apps
Click the option: "Create a new app". Enter the name of the app and a valid url from where your app can be downloaded. These two fields are mandatory. You can provide the details for other fields also. If you don't have a download link, you can create a folder in dropbox (google drive, onedrive) and provide that link. Create your app and you will get your private CLIENT_ID and CLIENT_SECRET.

Related

Instagram API - search user

i am building a website where you can get services for your Instagram account, i want to create a Search box that when you put your user name (e.g. "#John") it returns your profile picture and asks you if that is the correct profile (without logging in to your Instagram account),
I've found a website that made that possible already, does any one know how?!
the website - https://app.get-notch.com/acquisition/instagram-username
thank you in advance!
You should check out this resource that allows you to do that. See an implementation of it here and test it here.

How to access Sharepoint site's document library via Microsoft Graph API?

I'm working on accessing document libraries for Sharepoint sites via Mircosoft Graph, but haven't had any luck so far.
Here is my setup:
I have two sites
https://mydomain.sharepoint.com
https://mydomain.sharepoint.com/teams/MyTestSite
When I make an api call to https://graph.microsoft.com/v1.0/drives, the response doesn't contain id of document library for second site (https://mydomain.sharepoint.com/teams/MyTestSite).
I have gone through documentation and haven't found anything on how to accomplish this. If anyone got any idea about this, please share.
Thanks.
I was able to figure out a solution for this. A sharepoint site is represented as a Group in Office 365. I found that out by doing some hit and trial.
So, after looking up their documentation for anything related to a Group, I got to this: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/group
And, by using the List groups endpoint I was finally able to get a list of all the Sharepoint sites which the authenticated user can access.
This API call requires Group.Read.All scope while requesting access token and only Admin users can authorize this scope. So, this will need a separate interface for Admin to list groups, potentially store the group-user mapping on my app for the user to be able to make api call (/groups/{group-id}/drive/items/{item-id}) related to the drive.
The V1.0 API has a way to list your doc lib as follows
GET https://graph.microsoft.com/v1.0/sites/mydomain.sharepoint.com:/Teams/MyTestSite:/drives
Hope this helps.
The beta API also exposes a Sharepoint endpoint.
You can also use the path if you already know your site structure:
GET https://graph.microsoft.com/beta/sharepoint:/sites

Accessing Spotify Data API

I am trying to access the Spotify Data API and I'm struggling to find any information on this. I have managed to access the standard Web API as described on the developer.spotify site and have been able to perform simple tasks such as getting track names, album names etc.
However, the Data API is what I'm interested in. This link describes to how to access it but I cannot find anything online referring to this.
I would really appreciate some help accessing this.
Many thanks in advance.
Edit: Do I need to already have access to the Spotify Analytics resource?
You need to apply for access. Spotify will probably give you API documentation when they grant you access.

Where can I get or generate appkey.c for Spotify?

I am trying to run the examples for CocoaLibSpotify, but I need the file appkey.c with the API credentials. Where can I get this, or how do I generate it?
You need a Spotify premium account. I think once you have one you can go to the Spotify Developer site and request and download an app key. https://devaccount.spotify.com/my-account/keys/

Get name from Google OpenId in yesod-auth

How can I get a user's full name from Google when authenticating with yesod-auth's GoogleEmail backend? In my app, I'd like to require users enter as little redundant information as possible.
I'm not sure where to start. Will I need to modify yesod-auth?
Unfortunately, yesod-auth doesn't currently provide you with enough access to the underlying OpenID response to get that information. I'd be happy to accept a pull request to extend the API in that direction.

Resources