To integrate with Silverpop - asp.net-mvc-4

Can anyone guide how to integrate with Silverpop, using OAuth(tokens)?
I referred this link
connecting to web api using c#
and I was able to get access token. After this I don't know how to proceed.
Thanks.

Take a look at my github repo:
https://github.com/marcelluseasley/IBM-Marketing-Cloud-XML-API-Wrapper
It isn't finished, but I started working on an XML API wrapper for the Silverpop API. First of all, if you are trying to integrate with the API, you should be able to contact client support and get a copy of the API PDF.
In any case, you should have a client id, client secret, and refresh token. You will need these three things along with a header value of "refresh_token" for the "grant_type" header key.
So you will first sent a post to https://api(pod number).silverpop.com/oauth/token . This will return an access token in a json dictionary ("access_token").
Any subsequent calls made to the API endpoint (https://api(pod number).silverpop.com/XMLAPI will require that you pass this access token in the header section of your request:
"Authorization:" would be the header key and
"Bearer: (access token)" would be the header value
Looking at my code will make it clearer if you are using Python. Your best bet is to get a copy of the API documentation. You have to be a Silverpop client to get a copy though.
Good luck.

Check the follwing:
http://www.codeproject.com/Articles/758362/SilverPop-Integration
Follow the step by step guide.

Related

Implementing OAuth2 with Socrata API

I'm implementing the Socrata API to be able to parse publicly-available data from the City of Chicago open data set. I am really just concerned about the data itself, so I did not initially think that I would need to implement OAuth2 through an app exposed via ngrok to be able to GET the data.
My initial attempt was to take the GET requests mentioned in their documentation and try to get responses through Postman.
Here's an example of such an attempt:
I also added my Socrata App Token as a param in the querystring, but the same message was shown.
So I tell myself, ok, maybe they deprecated GET requests without making the client go through OAuth2. If they didn't deprecate these GET requests, I would prefer not to have to deal with OAuth2, but I began implementing the authentication process and everything went successfully until I got to the following instructions found here:
I have every single value that needs to be included in that POST request except for 'authorization_type'. Where does this come from? I tried leaving 'authorization_type' in as a string, but received a response similar to the 'Invalid username or password' message in the top image in this question.
Are you only accessing public datasets from Chicago's data portal? From your screenshot it looks like you're trying to access the Building Permits dataset, which is public.
Authentication is only required for modifying datasets or accessing private data, so chances are very good you don't even need to authenticate. Just include an application token with your request for throttling purposes.
Glad to help you figure out your OAuth workflow, but it sounds like it might be unnecessary.

How to apply cron jobs to Api methods that requires authntication?

Hello frinds presently i am doing manually authentication and getting user tweets and post form various api like instagram,tweeter,youtube but it requires authentication .
Now i want to automate the process and wish to run cron so i can fetch data every hour with authentication.
I know it is possible by passing access token in url methods but no idea how to do it.
first of all you need to have those access tokens. I'll explain the YouTube API and will also write other API's links. Process is similar in almost every API first you get the token then you pass it in URL.
YouTube API :
Here is a document about YouTube API which will help you create your own access key. After creating it just pass the key in URL with key=YOUR_API_KEY. You can retrieve datas from these links they might also give you an idea about how to use the api key : Videos , Channels (There are examples in the documents for JAVA, PHP and Python ). If you are using PHP you can use this curl function for authentication and retrieving datas.

Foursquare API exposing secret in javascript

I want to integrate the foursquare API in my website but I'm not that familiar with API security so I want to make sure I'm doing it right.
I want to search for venues in an area like the documentation states:
https://api.foursquare.com/v2/venues/search
?client_id=CLIENT_ID
&client_secret=CLIENT_SECRET
&v=20130815
&ll=40.7,-74
&query=sushi
Using javascript however, I don't feel comfortable that the client secret is exposed in my code like this, because if someone looks at my source they have the client_id and client_secret which makes it possible to authenticate themselves with my code:
https://developer.foursquare.com/overview/auth
Isn't that the same as, "hey look at my source code, my username = "someusername" and my password is "somepassword"?
Shouldn't the "client_secret" remain secret like it says? Or am I looking at it the wrong way?
I think the issue is that you're trying to access the Foursquare API using Javascript, which is executed on the client side, so yes, anybody using your website can, with a little bit of investigation, see the secret key that you're using, which is something that you definitely don't want to do.
The way to get around that is not to access the API using code that is executed on the client side. Whatever language you have building the website on the server side should be the code that accesses the API (using the auth credentials that you have set up) and then returns the results of the API call to the rest of the code.
Alternately, you can get users to authenticate with Foursquare and get an access token, which you can then use in user-specific API calls, and it won't matter if those are executed on the client side. I think this is the relevant page in the documentation for using that method: https://developer.foursquare.com/overview/auth#access

How to specify and implement Telegram API methods in Requests?

I am trying simply connect to Telegram API servers and get response.
I've create a app in my.telegram.org, Now I have my api_id, api_hash and also IP address to Telegram api MTproto serever. for getting start documentation says we have to Authorize first using auth.sendCode method to send a code to api user's phone.
so I tried this python script to use auth.sendCode method:
q="auth.sendCode \"phone_number\" 0 api_id \"api_hash\" \"en\""
res = requests.post("http://149.154.167.50:443",data=q)
and when I print res, it says Response [404]. according to the documentation it means An attempt to invoke a non-existent object, such as a method.
I am sure the problem is about my data field in post request. the string I made for calling auth.sendCode method is wrong so server can't recognize what I am trying to reach to.
there is a Query example for that method in documentation :
(auth.sendCode "79991234567" 1 32 "test-hash" "en")
please someone helps me to correct that data string (according to this example). how can I implement API methods in Post Requests?
First steps: Understand how to generate a Telegram AuthKey.
That exercise will help you build up the the basic knowledge need to move tackle Telegram API (and the rest API documentation) on your own.
For starters, i have outlined some of the basics in this SO Post (using vb.net)

How to make twitter api calls using access token

I have managed to get an access token from the twitter api. Now I want to use that token for my further data fetching things, so please help me here to get the details of my twitter account.
For example, lets say I wanted to get the user's data, so when I tested this in apigee console, I got my result.
But how to get the same result, using same api, by hitting on a browser using the access token
something like this
Please help
It's a little more complex than the URL you suggested, but you can use Twitter's OAuth tool to generate the OAuth signature you need to make requests to its Home Timeline API call.
You can find the OAuth tool here:
https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline#oauth-tool
it's not like that when making twitter api calls you need to send consumer key, consumer secret, your_access_token and your_access_token_secret together
Eg: oauth_consumer_key="KEY",oauth_signature_method="HMAC-SHA1",oauth_timestamp="TIMESTAMP",oauth_nonce="NONCE",oauth_version="1.0",oauth_token="YOUR_TOKEN",oauth_signature="SIGN"
Source: https://twittercommunity.com/t/getting-the-user-details-using-access-token/6325/3