Can not find Public API Access in google clould storage - google-cloud-storage

From https://github.com/GoogleCloudPlatform/storage-getting-started-javascript
/**
* Enter the API key from the Google Developers Console, by following these
* steps:
* 1) Visit https://cloud.google.com/console and select your project
* 2) Click on "APIs & auth" in the left column and then click “Credentials”
* 3) Find section "Public API Access" and use the "API key." If sample is
* being run on localhost then delete all "Referers" and save. Setting
* should display "Any referer allowed." For more info see:
* https://developers.google.com/console/help/new/#generatingdevkeys
*/
I went to step 3, but I could not see Public API Access. Where can I find it?
here is my screen shot

The page has moved. Updated instructions:
Visit https://console.developers.google.com and select your project from the dropdown at the top.
Click on “Credentials” on the left menu bar.
Click the "Create credentials" drop down and select "API key".
Select "Browser Key"
If sample is being run on localhost then delete all "Referers" and save.

Related

Track Microsoft Teams userid for who opened the tab (created by bot)

I have a Microsoft teams bot that creates tab in channel on certain requests.
I want to track who is the user in channel who opens the tab.
Is there a way to do so?
Any help is appreciated. TIA!
You can try to Get Context for your Tab. It return the User Object ID, Login Hint, User Principle Name of the user who is accessing the Tab
Here is the Method which you can call:
You can also retrieve the information listed above using the Microsoft Teams JavaScript client SDK by calling
microsoftTeams.getContext(function(context) { /* ... */ }).

Using Box with JWT (Server Authentication)

I using Box API JWT Server Authentication:
IAccessTokenCache accessTokenCache = new InMemoryLRUAccessTokenCache(100);
Reader reader = new FileReader("D:\\config.json");
BoxConfig boxConfig = BoxConfig.readFrom(reader);
BoxAPIConnection api = BoxDeveloperEditionAPIConnection.getAppUserConnection(USER_ID,boxConfig);
but the Box exception:
{"error":"unauthorized_client","error_description":"This app is not authorized by the enterprise admin"}
#kendomen is correct. Here's some more detail:
Go to api.box.com. Then select Admin Console.
Now this is where it gets funky. Click on the Security step.
Then the fine print.
This gives the tool bar that should have been displayed three steps ago. Click Apps.
Then click on Authorize New App.
This puts up a pop-up where you enter the app key. This is referred to as the "ClientID" in the json file you may have downloaded from Box.com.
The admin of Box has to go to Admin Console -> Enterprise Settings -> Apps and authorize your app.

graph.facebook.com/username does not work

I tried to get user detail using https://graph.facebook.com/username . But it throws an error
"error": {
"message": "(#803) Cannot query users by their username (ramesh.randika.56)",
"type": "OAuthException",
"code": 803
}
does anybody have a solution for this problem.
graph.facebook.com/{Username} is not avaiable now but lookup-id.com still can find your facebook ID, facebook group ID and facebook page ID
"View page source" Option in every web browser will help you.
Follow this-
Open the timeline of that person/FB account.
Right-click anywhere on the web-page->View page Source-> wait 1 or 2 seconds to load the new page.
Press Ctrl+f (used to find any string,word in the page) then type " profile_id= " (without quotes).
Copy the long number after " = ", .
Conclusion : Using the "username" doesn't work anymore (Updated till Oct 2018),profile_id is the thing u needed instead.
The username field was removed with the introduction of the Graph API v2.0.
See
https://developers.facebook.com/docs/apps/changelog#v2_0
/me/username is no longer available.

VK Oauth: Authenticating user, giving error

I created an application in VK. But, when I try to authenticate a user, I am getting the following error:
{
error: "invalid_request",
error_description: "redirect_uri has wrong domain, check application settings"
}
Also, when I am creating application, I don't get any option to specify redirect-url.
Can anybody please help me, as to how should I resolve this error.
Go to https://vk.com/apps?act=manage, select needed app and click Manage. Click Settings on the left sidebar and edit Authorized redirect URI, Base domain and Site address fields (Under the Open API title)

Getting page photos with Facebook Graph API

I'm using Facebook Graph API here: http://crackit.seegermattijs.be/wedstrijd.html I'm trying to get access with the following url: https://graph.facebook.com/10150146071791729/photos
This was working for 2 weeks but all of a sudden I always get following error
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104
}
}
Is there anyone who can figure this out?
Kind regards
Seeger
Try this ....
https://developers.facebook.com/tools/explorer/?method=GET&path=10150146071791729%2Fphotos
I'm using 'Graph API Explorer', that's no problem.
"message": "An access token is required to request this resource."
This message means "You're not logged in with Facebook"
You need to renew your Access Token.
Ensure that you are an Admin of the Facebook Page.
go to :
http://developers.facebook.com/tools/explorer
In the API Navigator, you can see "/me" will bring up the basic information of yourself.
Try typing in "/me/accounts" to see if you can see anything. It should give you an error.
Click on "Get Access Token"
a window will pop-up. Navigate to "Extended Permissions"
Select "manage_pages"
Click "Get Access Token"
Now try "/me/accounts" again. You should see a list of Groups inside the viewing window.
Select the Page you want, and click on the "id" field
Next, on the left window, you can see "Node: " and a + sign. Click on the + sign to see what are the options you have.
Click on the + sign and scroll down to "connections" and select "Albums"
The child-level, select "Photos"
The "Photos" child-level, select "source"
Now click "Submit" on the right hand side. You will see a JSON returned with the url of all the photos in your Facebook Page.
Copy the URL - https://graph.facebook.com/?fields=albums.fields(photos.fields(source)) and plug it into your browser. You should see a JSON of all your photos.