curl --request POST \
--url https://api.pipedream.com/v1/connect/{project_id}/oauth_apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"name": "<string>",
"description": "<string>",
"scopes": [
"<string>"
],
"additional_scopes": [
"<string>"
]
}
'import { PipedreamClient } from "@pipedream/sdk";
const client = new PipedreamClient({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET",
projectEnvironment: "YOUR_PROJECT_ENVIRONMENT",
projectId: "YOUR_PROJECT_ID"
});
await client.oauthApps.create({
app: "app"
});
from pipedream import Pipedream
client = Pipedream(
project_id="YOUR_PROJECT_ID",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
client.oauth_apps.create(
app="app",
)
package com.example.usage;
import com.pipedream.api.BaseClient;
import com.pipedream.api.resources.oauthapps.requests.CreateOauthAppOpts;
public class Example {
public static void main(String[] args) {
BaseClient client = BaseClient.withCredentials("<clientId>", "<clientSecret>")
.projectId("YOUR_PROJECT_ID")
.build()
;
client.oauthApps().create(
CreateOauthAppOpts
.builder()
.app("app")
.build()
);
}
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pipedream.com/v1/connect/{project_id}/oauth_apps"
payload := strings.NewReader("{\n \"app\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"additional_scopes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"name_slug": "<string>",
"name": "<string>",
"img_src": "<string>",
"custom_fields_json": "<string>",
"categories": [
"<string>"
],
"featured_weight": 123,
"scope_profiles": [
{
"name": "read_only",
"scopes": [
"<string>"
]
}
],
"client_id": "<string>",
"owner_id": "<string>",
"auth_type": "keys",
"description": "<string>",
"oauth_app_id": "<string>",
"scopes": [
"<string>"
],
"additional_scopes": [
"<string>"
],
"scope_labels": {
"scopes": "<string>",
"additional_scopes": "<string>"
},
"redirect_uri": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Throttled"
}Create OAuth client
Register a custom OAuth client for an app
curl --request POST \
--url https://api.pipedream.com/v1/connect/{project_id}/oauth_apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"name": "<string>",
"description": "<string>",
"scopes": [
"<string>"
],
"additional_scopes": [
"<string>"
]
}
'import { PipedreamClient } from "@pipedream/sdk";
const client = new PipedreamClient({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET",
projectEnvironment: "YOUR_PROJECT_ENVIRONMENT",
projectId: "YOUR_PROJECT_ID"
});
await client.oauthApps.create({
app: "app"
});
from pipedream import Pipedream
client = Pipedream(
project_id="YOUR_PROJECT_ID",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
client.oauth_apps.create(
app="app",
)
package com.example.usage;
import com.pipedream.api.BaseClient;
import com.pipedream.api.resources.oauthapps.requests.CreateOauthAppOpts;
public class Example {
public static void main(String[] args) {
BaseClient client = BaseClient.withCredentials("<clientId>", "<clientSecret>")
.projectId("YOUR_PROJECT_ID")
.build()
;
client.oauthApps().create(
CreateOauthAppOpts
.builder()
.app("app")
.build()
);
}
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pipedream.com/v1/connect/{project_id}/oauth_apps"
payload := strings.NewReader("{\n \"app\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"additional_scopes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"name_slug": "<string>",
"name": "<string>",
"img_src": "<string>",
"custom_fields_json": "<string>",
"categories": [
"<string>"
],
"featured_weight": 123,
"scope_profiles": [
{
"name": "read_only",
"scopes": [
"<string>"
]
}
],
"client_id": "<string>",
"owner_id": "<string>",
"auth_type": "keys",
"description": "<string>",
"oauth_app_id": "<string>",
"scopes": [
"<string>"
],
"additional_scopes": [
"<string>"
],
"scope_labels": {
"scopes": "<string>",
"additional_scopes": "<string>"
},
"redirect_uri": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Throttled"
}Authorizations
Path Parameters
Body
Response
OAuth client created
An OAuth client, either a custom client (bring your own app) or a Pipedream official client, presented as its app's metadata merged with the client's own fields. name and description fall back to the app's when the client doesn't set them. The client secret is write-only and never returned.
The name slug of the target app (see https://pipedream.com/docs/connect/quickstart#find-your-apps-name-slug)
The OAuth scopes requested when an account connects through this OAuth client, or, on an app, through the app's Pipedream official OAuth client and no oauth_scope_profile. null when the app doesn't use OAuth or has no official client. Absent when the app is embedded in another resource, such as an account.
A second list of scopes requested alongside scopes. The connection does not require the user to grant them. scope_labels names both lists. null when there are none, or when the app doesn't use OAuth or has no official client. Absent when the app is embedded in another resource, such as an account.
Was this page helpful?

