Create OAuth Link
GET/headless/oauthUrl
This endpoint can be used to generate an OAuth link if you want to completely white label your authentication experience. You can use this endpoint to generate a link which your users can click to redirect to the specified application without rendering the Alloy Embedded Modal.
Note: this endpoint only works with OAuth enabled integrations. To add a credential manually, please use the POST Create Credential API.
This endpoint takes a userId
, integrationId
, and credentialName
as inputs. It should be used in conjunction with the GET Credential Metadata API. credentialName
represents the name of the integration you want to call.
If the credential metadata endpoint returns any properties,
you must pass them as query string parameters at the end of this call.
Request
Query Parameters
The id of the user to generate this link for
The name of the app you want the user to authorize access to
Default value: the credentialName
Header Parameters
Default value: bearer YOUR_API_KEY
Responses
- 200
200
- application/json
- Schema
- Example (from schema)
- Result
Schema
{
"oauthUrl": "https://api.runalloy.com/api/strategy/shopify/authorize?userId=xyz123abc098754&shopSubdomain=my-shoe-store"
}
{
"oauthUrl": "https://api.runalloy.com/api/strategy/shopify/authorize?userId=xyz123abc098754&shopSubdomain=my-shoe-store"
}