Automating the adding of a website profile via google APIs - web

I was poking around Google's analytics API docs to see if there is a method that allows the adding of website profiles. Either by using a email/password or session or one time token. Has anyone seen anything?

No, I don't think there is a way to programmatically add a profile. They do have a good API for reading the data in an existing profile.

Related

Azure b2c Custom email verification doesn't work

I have several days trying to customize the email verification of my project but it's been impossible to change anything.
I followed many times:
https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-get-started
https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-email-sendgrid
https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-email-mailjet
I uploaded the new custom policies B2C_1A_TrustFrameworkBase and B2C_1A_TrustFrameworkExtensions with all the changes described in the manual, but I still don't know why I can't even generate an application error and the default Microsoft email verification keeps working normally, is there any way to track what I might be missing?
You can refer to the troubleshoot documentation about turning the B2C engine into developer mode and tracking the B2C engine itself.
There is a separate documentation and technical profiles explaining how to use application insights to track user behavior during user journeys. You can discover more about this here: https://learn.microsoft.com/en-us/azure/active-directory-b2c/analytics-with-application-insights

Custom Users when using Jenkins Google Login Plugin

I am attempting to our company's Jenkins from the Jenkins user database + matrix based security to using Google Login Plugin and Role based strategy plugin to give us better control of our user accounts.
With this new set up I am wondering how I could go about creating a designated user which is used by scripts which trigger Jenkins jobs remotely. I would like to do this without having to add a user to our company's GSuite account as this costs a few $ per month. Before the switch to Google Login I could just create a user manually in the Jenkins user database and take the API token from there but since switching to Google Login there is no option to add a user (which makes sense given than the users are managed by Google now). At the moment it seems like I have to choose from:
Use the old approach and forget about authenticating through google. This is not a great result as we want to minimize the number of user accounts we have to set up for new people joining the company to overhead of onboarding.
Use Google Login Plugin and create a new dedicated "Jenkins" user in GSuite for these scripting / requirements. This costs money.
Use an existing users API Token to avoid the cost of a new Google User in our GSuite account. This seems like bad practice which I'll regret at some point.
Is there a workaround which doesn't require a designated GSuite user or repurposing an existing Google users credentials just for this purpose?
I did a similar research a while ago and it seems like there is no way to do so right now.
However, I'm using SAML plugin with GSuite instead of Google Login Plugin, but from Jenkins security perspective I assume they work in the same way.
When you're using such plugin, Jenkins creates a securityRealm in its config. In my case it is:
<securityRealm class="org.jenkinsci.plugins.saml.SamlSecurityRealm" plugin="saml#1.0.7">
Therefore, to have SAML and Jenkins security matrix work simultaneously, you have to have several security realms.
Here is a ticket, which describes this issue, but it's still open
Regards!
I was also looking at how to trigger builds remotely when using the Google Login Plugin.
I ended up using the "Build Token Root Plugin" which solved this problem, without any need to create a dedicated user for this.
This plugin offers an alternate URI pattern which is not subject to the usual overall or job read permissions. Just issue an Http GET or POST to buildByToken/build?job=NAME&token=SECRET. This URI is accessible to anonymous users regardless of security setup, so you only need the right token.
https://wiki.jenkins.io/display/JENKINS/Build+Token+Root+Plugin

Azure Login on my Website

Hey Guys i just quickly wanted to double check – as far as i know there is no way to implement the Microsoft Azure Login into an existing Website / Style – is this correct or is there any kind of work-around?
It really is annoying that customers need to "jump of" our page to azure to login in.
You can choose e.g. the background image. But, of course you can do the authentication back-end yourself, using the Microsoft Authentication libraries. See here for more info: https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-scenarios

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.

How to add Instagram feed using HTML or Javascript

So I'm trying to add an actual Instagram feed to my wordpress site. I dont want to use a 3rd party site which doesnt drive traffic to the actual IG site. I've been on the IG developers site and to be honest kind of confusing. Any help would be greatly appreciated.
I would recommend using a plugin to do the hard work, since there are many out there, and integrating the instagram yourself could be a challenge. A quick google search gave me this one:
https://wordpress.org/plugins/instagram-feed/
If you don't want to use a plugin, you need to understand how the api works.
The instagram API requires OAuth authentication for most calls.
First, You will need to register an application on the https://instagram.com/developer/ site in order to obtain a client Id.
Once you have a client Id, you need to establish a flow for users who visit your site. There is no way around this for API calls requiring authentication.
First, the user needs to login and allow access from your account using the instagram api request url:
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code
CLIENT-ID is the id you obtained earlier, and REDIRECT-URL should be your wordpress site.
Calling this url will allow you to obtain an access token for the user on your site, and you can then make authenticated calls to the API using that token.
One way around this is to make simple calls that don't require authentication, using tags that are specific to your photos. That is described in this SO question:
Instagram API and importing photos without server side authentication
Cheers,
I agree with Felipe. If you or your client need an Instagram plugin, the easiest way would be to buy it at some marketplace. What’s more important, it is much cheaper than wasting your own time on developing one. Of course, that applies to commercial development, not something that you do for fun.
Here’s a list of plugins that I’ve installed to my clients and was happy about:
https:// wordpress.org/plugins/instashow-lite/ - lite version of the
premium plugin. The functionality is really limited, but it would be
enough to give you a simple display.
https://codecanyon.net/item/instagram-widget-wordpress-plugin-for-instagram/11170758 - a simple commercial widget to display your Instagram
account on a webpage.
https://elfsight.com/help/how-to-embed-instagram-feed-widget-on-html-website/ -
an interesting cloud solution for websites on any CMS. It’s got a demo and a
free plan.

Resources