Posting an entry from IBM Social Business Toolkit playground to on premises Connections - ibm-sbt

I am trying to post entry to community activity stream from IBM Social Business toolkit playground (Domino 9, SBT SDK version 20130602) to on premises Connections install. I am using the playground's existing JavaScript snippets but changed the communityID to match to community UUID in my Connections install. I don't have the OAuth2 configured.
I get an error "Error code:403, message:You are not authorized to perform the requested action."
I am able to get data from Connections. For example "Get Updates From A Community" -snippet works. But I am not able to post anything to Connections.
Do I need a working OAuth2 to be able to post entries or is there something else what prevents posting entries to Connections activity streams?
I tried to add a role to my account according to this post Which J2EE Role need to be enabled to post in the Activity Stream of other user but it did not seem to have an effect.

I was able to get the post entry working. The issue seems to be the browser what I used.
Posting entry did not work with Chrome but with Firefox everything worked as expected. So there seems to be some problems with Chrome and posting entries from the playground. Getting data from Connections works also with Chrome.

Are you prompted for basic authentication (either basic auth or OAuth would would work)? Or are you just accessing public communities?
Can you try to go to the authentication snippets, log in if not already (basic auth),and try the snippet again? If you still have a 403, it might be because your user doesn't have enough rights.

Related

My Google API keeps returning a limit reached error, when I am sure I am under the limit

I am currently building a NodeJS backend app that is querying the Google Calendar API. I have setup a new project on Google Cloud API platform and have generated all the required credentials. As stated by the google calendar API page, the allowed queries per day is 1,000,000. Since I am only querying for testing purposes at the moment, I am sure that I haven't even hit a 100. Yet whenever I try to query the API it returns the error:
"The API returned an error: Error: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
Also I have noticed that the dev console has generated a API key for me. Where am I supposed to put that?
My initial thinking is that Google API requires me to perform an additional signup using some CLI tools or something along those lines to signup. If not, where am I supposed to sign up?
Thanks in advance.
Note: I already have all the information from the cloud platform such as client_id, client_secret, project_id.
In "Error: Daily Limit for Unauthenticated Use Exceeded", they key word is Unauthenticated. Your request to the Calendar API is missing an OAuth Access Token. You will need to research Google OAuth.
This question has been answered many times. Please learn how to search SO for similar questions whenever you post a new question. https://stackoverflow.com/search?q=google+oauth+%22daily+limit+for+unauthenticated%22
To anyone who comes across this post in the future. I fixed the issue by using the project generated by Google Calendar API site (https://developers.google.com/calendar/quickstart/nodejs) by clicked the big blue "Enable the google calendar api" and then changing the name of the quickstart project that was generated. I don't know why it works now but it does and it's been working quite stably so far. Lets see how to goes.

Skype for Business channel doesn't pass authentication credentials correctly

I have a .NET Bot Framework bot created using the template and tested on other channels and in the dashboard.
I've added the Skype for Business channel and performed the PowerShell cmdlets for my tenant. However, I constantly get the reply "Error happened in contacting target user".
I looked in the Bot Framework Dashboard for issues, and the problem is that the Bot Framework is getting back a 401 Unauthorized from my code. Remember that this works fine in other channels.
Suspecting a problem with how Skype for Business passes (or doesn't pass) the authentication tokens I commented out the BotAuthentication decorator. Suddenly everything works fine. So I think there's a problem with the Skype for Business channel and how it passes the authentication credentials, as this situation clearly isn't ideal.
Just to answer my own question on this. The reason I was seeing this problem was because I did not have the latest version of Microsoft.Bot.Builder. I needed to be running 3.5+ and I wasn't. I've written it up here (along with instructions for updating the NuGet package if you need that): https://blog.thoughtstuff.co.uk/2017/06/how-to-enable-your-bot-framework-bot-on-skype-for-business-part-2-or-how-i-followed-the-instructions-and-it-worked/

Bot Framework always getting unauthorized response

I started using Microsoft Bot Framework and followed step by step all tutorials.
I has been able to register a new bot and to deploy it working good with emulator, but except it nothing else works.
Test connection to your bot chat do not works despite I get answer from emulator and from all connected channels, that where created and registered properly I always get an Unauthorized response or something like that, anyway no response, so nothing works.
I tried with Twilio, Web Chat, Telegram (Skype auth is pending) getting always the same response.
As it seems I strictly followed the tutorials, is there something else to do or to be approved? Or just the service is still not working at 100% as too young?
Thanks
If you are using HTTP you need to disable basic auth because the connector won't send your appSecret in the clear.
The solution is to make sure you register as HTTPS, or if you need to use HTTP then disable the basic auth.
Took me a while to get it working locally too. Oddly for me it only works when those 'secret' fields are empty, as mentioned and running in debug.
Running without debugging seems to always result in a 401
Hi I was facing same problem to work bot locally in v3. I just made everything blank in web.config and it is working.
I solved the problem.
It was related to https. It's not well explained into tutorial but when you create and publish a service in Azure it is created as http://XXXXXXX.azurewebsites.net as shocased into tutorial, but it will not work as your service must run in https.
I so used https://startssl.com to create a free ssl certificate then turned on SSL into my Azure service so everything started working.
I've cleaned up the getting started with the following; hopefully it will make it clearer for the next person who uses it:
Click the “Register a Bot” button and fill out the form. Many of the fields on this form can be changed later. Use a the endpoint generated from your Azure deployment, and don’t forget that when using the Bot Application template you’ll need to extend the URL you pasted in with the path to the endpoint at /API/Messages. You should also prefix your URL with HTTPS instead of HTTP; Azure will take care of providing HTTPS support on your bot. Save your changes by hitting “Create” at the bottom of the form.
Make sure you are using HTTPS. BotFramework will not work with basic auth so tokens are not passed in the clear.
See: http://docs.botframework.com/connector/calling-api/
Make sure that you republish your bot service after registering and getting the app Id and password. If you fail to do this you will get Unauthorized. The steps are 100% clear on this and I hit this for a minute.

Youtube API v3 shows "Access Not Configured"

I created a Google application in the developers console, turned on "YouTube Data API v3", generated the server API key, and authorized my home and work IPs.
My website lists all videos from a Youtube channel, using the V3 API. It uses the official PHP library, passing it the server API key.
It all worked well yesterday from home, and today morning from work. Then, it suddently stoped working at 11am (GMT+1), with no action from my part, with this error:
[Google_Service_Exception] Error calling GET
https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=xxxxxxxxxx&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
(403) Access Not Configured. The API is not enabled for your project,
or there is a per-IP or per-Referer restriction configured on your
APIkey and the request does not match these restrictions. Please use
the Google Developers Console to update your configuration.
Note: i used less than 10 requests, out of the 50 millions allowed by day, i have a static public IP address, this part of the code was untouched.
What can i look for in order to fix that, please? I really don't know where to head for from now... Thank you.
Oooook...
Do all you have to with the API activations before you generate any keys!
Unactivating or reactivating API (like "Youtube Data") silently destroys your key validity. At least for the server one.
So the solution is, when you get the same error as me:
destroy your server key (delete it completely, do not only regenerate)
deactivate then reactivate all APIs you need
create a new server key
thank Google for the so clear error messages (optional)
Additionnaly when I opened the requested URL in browser I found that the API call returned
{"domain": "usageLimits"}
I tried the above solutions without success.
Creating a new project from scratch solved the issue
Thanks #Danra, you helped, but I add this answer because your comment is default hidden.
This solved for me....
i first followed #Ninj answer...still no change.
Then, After adding my domain urls to 'allowed referers' list,
i regenerated the key alone
it then worked like a charm !
i guess google parses allowed urls from the key string itself, not from updated settings
I got frustrated and created a new project with a new key and it worked like a charm.
Solution 1:
Create new project and enable Youtube Data v3 api and create credential.
Solution 2:
Check limit Quota in Youtube Data v3 -> Quota (in left pane) &
Increase the limits per day or request for Higher Quota
I also tried everything, but could only solve this when I created a new project, gave access to the APIs I needed, and added a new key.
I also got a "Bad Request" error and this solved it.
I also tried everything, but could only solve this when I created a new project, gave access to the APIs I needed, and added a new key.

Can't connect to new CRM Online Security model with XrmDataContext

Microsoft has changed the authentication model for new CRM sites from LiveID to Microsoft Online Services. I set up a new site this week and have it up and running but code I wrote that connects to the site using early bound classes fails to authenticate.
My connection string for an older site using LiveIDs looks like this.
I am trying to connect to the new site that uses Microsoft Online Services for authentication with this connection string
I create an instance of XrmDataContext and it seems to work OK until I actually upll data fromthe site. The error I receive is
ACS10002: An error occurred while processing the SOAP body. ACS50012: Authentication failed.
I tried all of the authentication types list here http://technet.microsoft.com/en-us/library/ff681567 and none seemed to work.
I see a lot of forum posts saying that the discovery service URL has changed so I tried adding that to my connection string.
Discovery URL=https://disco.crm.dynamics.com/XRMServices/2011/Discovery.svc
No luck.
Has anyone written code that connects to the new security model? Did you do anything special?
Thanks in advance,
Bill Wolohan
MS released a new version of the SDK on 8/17/2012. I had downloaded the latest on 8/16/2012 and that version did not work. Once I downloaded the newer version and recompiled it worked great. I just had bad timing. :-(

Resources