Profiles
Generate a JWT
Generate a JSON Web Token (JWT) for use with single sign on.
POST
Generate a JSON Web Token (JWT) for use with single sign on. See the Generate JWT Overview for more details.Documentation Index
Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
The JWT URL is valid for 5 minutes. After 5 minutes you must generate a new JWT URL.
See the Max Pack
expiresIn for additional options.Header Parameters
Your X API Key (Consumer Key) from the X Developer Portal. Alternative to the
twitterApiKey body parameter. When provided, the generated JWT URL will use your X Developer App for OAuth linking.Your X API Secret (Consumer Secret) from the X Developer Portal. Alternative to the
twitterApiSecret body parameter. Required when X-Twitter-OAuth1-Api-Key is provided.Recommended: Pass your X credentials via headers (
X-Twitter-OAuth1-Api-Key and X-Twitter-OAuth1-Api-Secret) for consistency with all other Ayrshare API endpoints. The twitterApiKey and twitterApiSecret body parameters are still supported for backward compatibility.Body Parameters
Domain of app. Please use the exact domain given during onboarding.
Private Key used for encryption.
User Profile Key. The API Key cannot be used in this field.
Automatically logout the current session. Recommend not to use in production since it affects the performance.See Automatic Logout of a Profile Session for more information.
Specify a URL to redirect to when the “Done” button or logo image is clicked. The URL will be automatically shortened in the returned JWT url. Redirect the origin opener window by adding the query parameter
origin=true to the redirect URL.Specify the social networks to display in the linking page. This will override the social networks configured in the Social Networks page.
Only display Facebook, X/Twitter, LinkedIn, and TikTok
Verify that the generated token is valid. Recommend to only use in non-production environment.See Opening and Closing the Social Linking URL for more information.
If the private key is base64 encoded, set to
true.Encode the private.key file in base64 and pass the single line String in the privateKey field.E.g in Linux: cat private.key | base64Set the longevity of the token in minutes. Range: 1 minute to 2880 minutes.See JWT Expires In for more information.
Send a Connect Accounts email with a link for users to directly access their social linkage page.See Connect Accounts Email for more information.
When you include your X API credentials, the generated JWT URL will initiate OAuth linking using your own X Developer App. Your end-users will see your app name on the X consent screen.
