can someone here explain to me how does cURL works in web development? I'm integrating a 3rd party tool to a Shopify website and found the documentation of it that says I can authenticate the API token using cURL but I don't know how does this cURL really works, read a bunch of articles and documentation, saw some youtube video about it but it still go thru my thick skull.
As of my understanding cURL is a CLI tool? and then what? how does that work in the live server? like this code below, where should I put it on in the live server? if It is a CLI tool then what to do in the live server? or am I going to the wrong direction? I hope I;m making sense
curl -X GET 'https://sample.com/sample?api_token=123123' -H 'accept: application/json'
Related
At first sorry if my english is not perfect !
I need help to create a dashboard for my company where I am in internship about their data on youtube.
Basically i need the same KPI,metrics and graph that you can find in youtube studio statistics.
But there is the problem I set up a project on google cloud platform and use the youtube anlytics api V2. But i fail to authentificate when i use the sample code from youtube documentation. On developer.google.com it's perfect, working smoothly and the data I retrieve is good but when i need to use postman to call my API is completely the shit.
It said that I need an Oauth 2 key but i have it.
for example : curl
'https://youtubeanalytics.googleapis.com/v2/reports?dimensions=day&endDate=2022-07-04&ids=channel%3D%3DMINE&metrics=estimatedMinutesWatched&sort=day%2C&startDate=2022-01-01&key=[YOUR_API_KEY]'
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]'
--header 'Accept: application/json'
--compressed
this code work on youtube documentation because I authentificate with the youtube channel of my company but i have the main account and a youtube channel link to it.
I think the problem is i need to create the project with the youtube channel but how can i do that ???
I search everywhere and didnt fint anything about it.
And with Postman what call i have to do ?
I'm not a pro but i work on google analytics and linkedin API and it was fine but here i just want to destroy my computer.
I already create the API key and the ID clients OAuth 2.0 replace everything i could on the request but nothing
Someone know what to do ?
Thanks for all your reply
I not hugely experienced with API's, but I was wondering the difference in Postman with using the 'Authorize using Browser' below Callback URL and not using it. (I'm trying to connect to Microsoft Dataverse using Web API) When I don't use it a pop up comes up fine and I can sign in and authentication goes great. But if I use the browser it won't work. Now, I don't have Azure Admin rights to set up callback URL's in my environment so I imagine that is part of the issue, I'm just wondering why it works one way and not the other. I was trying to replicate in python and am getting the same error as trying to use browser in postman. I would like to understand what backend process Postman is using in the non-browser version so I can replicate if possible. I followed Microsoft's example in the link below as well.
Postman Example
https://learn.microsoft.com/en-us/learn/modules/common-data-service-web-api/3-postman?ns-enrollment-type=learningpath&ns-enrollment-id=learn-dynamics.integrate-power-platform
I am using Branch for redirecting users to their corresponding app store but also to track where the user comes from. However I can't find a way to put a trackable Branch link on Instagram or Facebook. It gets rejected not following 'Community Standard'.
So I am in this situation:
app.myapp.com => redirection accepted by Community Standard but no tracking link
app.myapp.com/zJQj4nY6fX?ref=trackingref => rejected by Commynity Standard.
The ref allows me to do the tracking.
Anyone has a suggestion ? I have also checked at Branch workaround but can't really understand what to do in the workaround.
Thank you for your help!
Sorry to hear about the issue with posting your link to Facebook. How are you sharing these links in Facebook? When sharing links to Facebook via their newsfeed, messaging features, etc they will block links if they determine the link violates Facebook's community guidelines, links can be flagged as spam and may be blocked from being posted if:
Facebook detects that the post includes a link to a malicious website
Attempts were made to post the same link multiple times or in multiple places
You will want to reach out to FB support to get your link unblocked https://www.facebook.com/help.
You also can set up monitoring for all your links using Facebook's Open Graph API. You can ping Facebook's Open Graph servers at regular intervals to check if the link has been blocked and immediately contact Facebook to resolve this issue.
curl -X POST \
-F "id={object-url OR object-id}" \
-F "scrape=true" \
-F "access_token={your access token}" \
"https://graph.facebook.com"
The API returns OG information for a valid link and fails if the link is blocked by Facebook.
If you are running ad campaigns, I would recommend using Branch's Universal Ads feature with FB Ads as Branch is a FB MMP and this should keep your links from being blocked.
https://docs.branch.io/deep-linked-ads/branch-universal-ads-mobile-tracking
https://docs.branch.io/deep-linked-ads/facebook-ads-overview/#facebook-ads-overview
Hope this helps!
I'm working on a project where, I need to send emails with some predefined messages. Titanium Mobile offers sending email through Titanium.UI.EmailDilog. But this does not fit to my requirements. I need to send email without displaying a dialog to user. If anybody have a solution to this, please tell.
You cant send emails using native API's without user consent (on iOS or Android). The only way to do it is with the native dialog. I'm pretty sure this is in place because Apple doesnt want you spamming on behalf of the user. For android the answer is the same, at least with Titanium.
If you really want to do this you have two options as I see it, write a webservice that sends emails on your behalf, and let the mobile app call it. Or wrap a library such as SKPMTPMessage for iOS to send messages programmatically.
You cant do it on the device using Titanium Mobile, but you can try using Appcelerator Cloud Services (ACS) to send it. See Cloud.Email
What are your requirements exactly? Is it sending predefined (transactional?) email to the user's inbox or on behalf of the user to a 3rd party?
For a simple solution (for verify user e-mail, password reset, etc.) I'd say Parse. An example from Parse for sending Password Reset e-mails:
You can initiate password resets for users who have emails associated
with their account. To do this, send a POST request to
/1/requestPasswordReset endpoint with email in the body of the
request:
curl -X POST \
-H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"email":"coolguy#iloveapps.com"}' \
https://api.parse.com/1/requestPasswordReset
source: Parse Documentation
For more custom transactional emails there is Mandrill (powered by Mailchimp)
Does any of that fit the bill?
I am pretty new to this, so I hope youll bear with me. Is there a way to sign into rally wsapi using a url? I have tried https://rally1.rallydev.com/slm/webservice/1.31/hierarchicalrequirement?username=someuserid&password=somepassword but that doesnt seem to work. I still get a login prompt.
I can sign in and pull up all of the info I need, but if I pull this data source from infopath it cant sign into or give anyone a prompt even to access the source once it's out on sharepoint. Ive tried everything I can think of, tried signing in using a customized udcx file, etc. Wasnt able to get curl to both authenticate through our proxy and to Rally either. Please help!
Rally's AppSDK has a LoginKey tool that can facilitate view-only access for external systems. Charles wrote up a great answer to this in Login to Rally using app sdk. You do have to file a case with Rally Support (rallysupport#rallydev.com) to obtain access to the tool.
For using curl, you should be able to pass your username and password on the command line like this (from the rally api doc):
curl -u 'curmudgeon#rallydev.com:SecretPassword' https://blah.blah.blah
For using other tools, if they have a mechanism for using "basic authentication", you should be good to go.