Generate token using Https activity in UiPath

Hi All,

How to generate OAuth2 Token using below details:

		"request": {
			"auth": {
				"type": "oauth2",
				"oauth2": [
					{
						"key": "scope",
						"value": "----",
						"type": "string"
					},
					{
						"key": "clientSecret",
						"value": "------",
						"type": "string"
					},
					{
						"key": "clientId",
						"value": "-------",
						"type": "string"
					},
					{
						"key": "accessTokenUrl",
						"value": "-------",
						"type": "string"
					},
					{
						"key": "grant_type",
						"value": "------",
						"type": "string"
					},
					{
						"key": "tokenName",
						"value": "-----",
						"type": "string"
					},
					{
						"key": "addTokenTo",
						"value": "header",
						"type": "string"
					}
				]
			},
			"method": "GET",
			"header": [
				{
					"key": "--------",
					"value": "-----",
					"type": "text"
				}
			],
			"body": {
				"mode": "raw3",
				"raw3": "",
				"options": {
					"raw3": {
						"language": "json"
					}
				}
			},
			"url": {
				"raw": "---------------",
				"protocol": "https",
				"host": [
					"---------",
					"-------",
					"net"
				],
				
			}
		},
		"response": []
	},

Thanks,
Riya

Hello @Riya1

Please check the below post.

https://docs.uipath.com/orchestrator/reference/using-oauth-for-external-apps

Hi @Rahul_Unnikrishnan ,

I have tried that but 401 code is coming up.

Thanks

Check these steps (an example of extracting the UiPath Orchestrator Bearer access token from the Registered Confidential External Application):

@marian.platonov ,

OAuth access token missing error is coming up

Provide some screenshots as is hard to guess your behavior.