PingOne Platform APIs

Step 6: Call the resume endpoint

 

GET {{authPath}}/{{envID}}/as/resume?flowId={{flowID}}

Use the GET {{authPath}}/{{envID}}/as/resume?flowId={{flowID}} request to obtain the authorization code required to exchange for an access token.

In this request:

  • {{authPath}} is the geographic regional domain to use for authentication and authorization for your PingOne environment. The PingOne top-level domain is https://auth.pingone.com/ for the U.S. Refer to PingOne API domains for the top-level domains for other regions.

  • {{envID}} is the environment ID for the environment you created in the prior workflow to create your test environment.

  • {{flowID}} is a String containing the flow ID value returned by the authorization request.

In the request headers:

  • Cookie header must be set to the ST ID value returned in Step 5 (for example, ST=3e0967f4-aba0-479c-86cf-fb5fe5b804d6).

The response returns JSON that includes the authorization code.

Troubleshooting

  • Verify that the flowID value is correct.

  • Verify that {{authPath}} is correct for your geographic region.

  • Make sure you set the value for the ST cookie. This is the session token that links the authenticated user to this sign-on session. The ST value is returned in the response as a header after successfully providing the username and password in Step 5.

Headers

Cookie      ST={{set-cookieID}}

Example Request

  • cURL

  • C#

  • Go

  • HTTP

  • Java

  • jQuery

  • NodeJS

  • Python

  • PHP

  • Ruby

  • Swift

curl --location --globoff '{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}' \
--header 'Cookie: ST={{set-cookieID}}'
var options = new RestClientOptions("{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Cookie", "ST={{set-cookieID}}");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Cookie", "ST={{set-cookieID}}")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
GET /{{envID}}/as/resume?flowId={{flowID}} HTTP/1.1
Host: {{authPath}}
Cookie: ST={{set-cookieID}}
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}")
  .method("GET", body)
  .addHeader("Cookie", "ST={{set-cookieID}}")
  .build();
Response response = client.newCall(request).execute();
var settings = {
  "url": "{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Cookie": "ST={{set-cookieID}}"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}',
  'headers': {
    'Cookie': 'ST={{set-cookieID}}'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests

url = "{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}"

payload = {}
headers = {
  'Cookie': 'ST={{set-cookieID}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Cookie' => 'ST={{set-cookieID}}'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
require "uri"
require "net/http"

url = URI("{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Cookie"] = "ST={{set-cookieID}}"

response = http.request(request)
puts response.read_body
var request = URLRequest(url: URL(string: "{{authPath}}/{{envID}}/as/resume?flowId={{flowID}}")!,timeoutInterval: Double.infinity)
request.addValue("ST={{set-cookieID}}", forHTTPHeaderField: "Cookie")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()

Example Response

200 OK

{
    "_links": {
        "self": {
            "href": "http://auth.pingone.com/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/flows/036ffb33-fcdb-4498-a64f-9a287dd12b3a"
        },
        "signOnPage": {
            "href": "https://apps.pingone.com/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/signon/?flowId=036ffb33-fcdb-4498-a64f-9a287dd12b3a"
        }
    },
    "_embedded": {
        "user": {
            "id": "b74be2c9-d8b9-4a67-aae4-35cd35073767",
            "username": "testuser1",
            "name": {
                "given": "Test",
                "family": "SimpleLoginUser"
            }
        },
        "application": {
            "name": "SolutionApp_1768234372"
        }
    },
    "id": "036ffb33-fcdb-4498-a64f-9a287dd12b3a",
    "environment": {
        "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
    },
    "session": {
        "id": "a949bcb9-b42e-4bee-803d-e614e8e83197"
    },
    "resumeUrl": "https://auth.pingone.com/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/as/resume?flowId=036ffb33-fcdb-4498-a64f-9a287dd12b3a",
    "status": "COMPLETED",
    "createdAt": "2026-01-16T20:21:01.501Z",
    "expiresAt": "2026-01-16T20:36:22.116Z",
    "authorizeResponse": {
        "code": "0383975f-6ac7-4e51-b5ef-1a946be4fbf6"
    }
}