I'm using postman native app but creating the environment using the postman API to avoid a manual step. I was successfully able to create the environment using the following:
POST - https://api.getpostman.com/environments
{
"environment": {
"name": "My New Environment",
"values": [
{"key": "variable_name_1", "value": "my_value"},
{"key": "variable_name_2", "value": "my_other_value"}
]
}
}
But, the newly created environment is not being displayed in the native app's environment's dropdown (even after the sync is complete).
Did anyone experience a similar issue and any pointers on how to resolve it ?
Thanks
OK, I tried adding the environment using the same call and I noticed one thing - the environment is created in ANOTHER workspace than the one I was sending the request from. Looks like a bug in Postman. Try double checking into ALL of your workspaces , clicking on "Sync" button again.
Related
I am trying to create a python script to ingest data into dv360. Its a script that just runs - its not a web app for instance. Thus I would assume its defined as a "server to server" application. Though its really a script to server application - is my computer the server in this case?
And thus I think I should be authenticating with a service account. But all the documentation I can find recommends using oauth2 for dv360 instead of a service account. Even inside of oauth2 I see that there is a delineation between installed oath and server to server oauth.
Can anyone who has experience with the dv360 api tell me what my application described above would be classified as and whether I need a service account, oath for installed apps, or oath for server to server apps in order to authenticate?
For your use case OAuth 2.0 for Server to Server Applications is recommended.
You can use Google API Python Client library to perform operations on DV360 using service account.
Here is the sample snippet to fetch DV360 Advertisers using this python client library.
import json
from googleapiclient import discovery
# DV360 service
dv360_service = discovery.build('displayvideo', 'v1')
# Get Advertiser Info
data = {'advertiserId': '1234567'}
response = dv360_service.advertisers().get(**data).execute()
print(json.dumps(response, indent=2))
Output:
{
"name": "advertisers/1234567",
"advertiserId": "1234567",
"partnerId": "8901234",
"displayName": "LoremIpsum",
"entityStatus": "ENTITY_STATUS_PAUSED",
"updateTime": "2022-10-14T04:46:31.291Z",
"generalConfig": {
"domainUrl": "https://www.example.com",
"timeZone": "Asia/Calcutta",
"currencyCode": "INR"
},
"adServerConfig": {
"thirdPartyOnlyConfig": {
"pixelOrderIdReportingEnabled": true
}
},
"creativeConfig": {},
"dataAccessConfig": {
"sdfConfig": {
"sdfConfig": {
"version": "SDF_VERSION_5_2"
}
}
},
"integrationDetails": {},
"servingConfig": {
"exemptTvFromViewabilityTargeting": true
}
}
Make sure to set GOOGLE_APPLICATION_CREDENTIALS environment variable with path/to/service-account-key.json before running the script
e.g. GOOGLE_APPLICATION_CREDENTIALS='/home/dikesh/.keys/service-key.json' python test.py
I have used AWS code commit "PutFile" API with url as : https://codecommit.us-east-2.amazonaws.com to add a file into AWS repo.
https://docs.aws.amazon.com/codecommit/latest/APIReference/API_PutFile.html
This PutFile as per above link is not working if my file contents are larger.
So PutFile API explantion : suggested to use GIT client where I am trying to know about git-remote-codecommit.
So Can anyone please provide me what is the url of git-remote-codecommit and how do I perform operations using that. Also what are the credentials I need to use and how to create them?
reference :
using Rest API : PutFile
I usually provide below json values and url to send a request and get the response back
{
"branchName": "string",
"commitMessage": "string",
"email": "string",
"fileContent": blob,
"fileMode": "string",
"filePath": "string",
"name": "string",
"parentCommitId": "string",
"repositoryName": "string"
}
https://codecommit.us-east-2.amazonaws.com
'''
Similarly using git-remote-codecommit , Do we have any API reference instead of CLI commands ?
like similar url as above along with we can provide request body and get the response?
Thank you
I have a NextJS app that runs on AWS amplify. I built a basic REST API by adding a pages/api directory to my project. The endpoint returns a 200 and some test JSON data. This works fine when I run the project locally. I deployed to AWS Amplify and the build detects that a Next API is present so it provisions a Lambda and configures the CloudFront behavior for /api/* routes to point to the Lambda function. When hitting the API CloudFront returns a 503 error:
503 ERROR
The request could not be satisfied.
The Lambda function associated with the CloudFront distribution is invalid or doesn't have the required permissions. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront)
Request ID: YnQI9alkoBXwkmkkpXwa29zqXaOT06VCXiBZWJI6xQVkhQ8MElB2bQ==
It doesn't appear that CloudFront is even calling the Lambda, as I am unable to see any logs in Cloudwatch. I've tried to debug and built a test that passes a mock CloudFront event request to the Lambda but I am unable to get my API to execute successfully.
It seems that Amplify/Next provides a lot of boilerplate code for supporting Next API routes so I'm not sure where to focus my debugging efforts.
Has anyone run into this issue before? Any guidance or suggestions would be super helpful!
I did have a similary problem, but i'm using serverless with #sls-next/serverless-component component. Because in moment hasn't support for NextJs 12 version.
In my package.json i'm force NextJs version for more recently in 11, this case is 11.1.4.
// package.json
{
"name": "next-aws",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^11.1.4",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"#types/node": "^14.14.37",
"#types/react": "^17.0.3",
"typescript": "^4.2.3"
}
}
I am building app using react native, Expo SDK - 41 & react-native-navigation - v5 that serves items to the users
How can I create links to be shared between users through social media apps like "WhatsApp" or "Facebook" as messages
For Example:
I found this item on "App Name". Take a look, https://myApp/itemId
When the user press the link it will open the app on specific screen to show that item (if the app installed on the receiver device), Otherwise will open the App store (Android or IOS) depend on the device to download and install the app.
And is there is any tutorial that explain the whole implementation for this feature ?
Here are the steps I used in our app:
For the steps below let's assume you own a domain https://example.com and you want to redirect all clicks on https://example.com/your-path/ to:
redirect to the app/play store if the app is not installed
opened in the browser if on a desktop device
open the app on iOS/Android if app is installed
Steps to achieve that:
You need a domain (e.g. https://example.com)
Registering Universal Links on iOS:
You have to prove to Apple that you own this domain by providing an Apple App Site Association (AASA) file from your web server.
Detailed explanation: https://docs.expo.dev/guides/linking/#universal-links-on-ios.
Note: No server-sided configuration needed for Android
After that you need to configure the domains (you specified in the AASA) in your expo app.json file (See: https://docs.expo.dev/guides/linking/#expo-configuration)
Note: The Expo docs don't show any example so I'll share one:
"expo": {
"name": "MyApp",
...,
"ios": {
...,
"associatedDomains": [
"applinks:example.com"
]
},
"android": {
...,
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "https",
"host": "*.example.net",
"pathPrefix": "/your-path"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
]
}
}
}
Result of the steps above: if you click a link like https://example.com/your-path/ (or any subdomain of that e.g. https://example.com/your-path/your-second-path?hello=world ...),
you should be redirected to the app on iOS/Android if the apps are installed.
However if the app is not installed a browser widow opens https://example.com/your-path/
Redirecting to app stores:
You have to configure the subdomain .../your-path in a way to check which device is trying to open it when loading the site and redirect to the app store/play store - url if it is an iOS/Android device resp.
Example: in our case the domain leads to a React web app and on loading the page ( on componentDidMount ) I check User's device using navigator.userAgent
This will of course differ from framework to framework.
Here you can also choose what to show or where to redirect if the link is clicked on a desktop device.
Handle links in your iOS/Android app:
Now in Expo you need to install expo-linking via expo install expo-linkingand set a listener to handle URL links in the desired component:
import * as Linking from 'expo-linking';
componentDidMount() {
this.grabLinkOpeningApp()
this.setLinkListenerWhenOpeningApp()
}
grabLinkOpeningApp() {
//Handles link when the link is clicked and the app was already open
Linking.addEventListener('url',this.handleUrl)
}
setLinkListenerWhenOpeningApp() {
//Handles link when app is closed:
Linking.getInitialURL()
.then(url => this.handleUrl(url))
.catch(err => this.handleError(err))
}
handleUrl(url) {
//Handle your link here
}
Note: Best to use the code in a component that is opened before the actual screen components. In this case you can catch the link no matter if the user is registered or not and like that it can "survive" the registration process.
7. Create a link and share it from your app:
You can add arbitrarily many query params to the link, i.e. .../you-path/key1=value1/key2=value2....
So you can create links within your app using data however you need it for your specific use case.
If you want to share the link via the typical share dialog where the user can choose the app you he wants to share the link with (i.e. Whatsapp, Facebook, Instagram, etc.), you can either import {Share} from 'react-native' or import * as Sharing from 'expo-sharing'
(see resp. expo docs, this part is very straight forward following the docs)
In the end, sorry for the long text, but I hope it explains the steps involved well.
I am having Facebook and Google user accounts in my meteor app. I did setup them using accounts-ui package using the nice default UI of it. But I removed the default UI and added some custom buttons. How to reconfigure the private and public keys when deploying now? I am using mup to deploy.
I believe there was something like settings.json and settings.production.json
You make mup use the latter one.
Edit: or it was settings.development.json and settings.json, the latter one is the default?
You could use a production or development settings file for deploying
your apps:
http://themeteorchef.com/snippets/making-use-of-settings-json/
meteor deploy example.meteor.com --settings setting-production.json
setting-production.json =>
{
"kadira": {
"appId": "XXXXXXXXXXXXX",
"appSecret": "XXXXXXXXXXXXXXXXXXXXXXX"
},
"reCaptcha": {
"secretKey": "XXXXXXXXXXXXXXXXXXXXXXX"
},
"public": {
"reCaptcha": {
"siteKey": "XXXXXXXXXXXXXXXXXXXXN"
}
}
}