curl --request GET \
--url https://app.rubiehq.com/api/v1/credential-sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.rubiehq.com/api/v1/credential-sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.rubiehq.com/api/v1/credential-sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.rubiehq.com/api/v1/credential-sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.rubiehq.com/api/v1/credential-sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.rubiehq.com/api/v1/credential-sessions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.rubiehq.com/api/v1/credential-sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "sess_MQ",
"status": "pending",
"hosted_url": "https://app.rubiehq.com/credential-collect/abc123",
"return_url": "https://app.example.com/settings/integrations/connected",
"strategy_id": "strat_NQ",
"credential_id": null,
"expires_at": "2026-08-07T17:00:00.000Z",
"completed_at": null,
"created_at": "2026-07-31T17:00:00.000Z"
}Get credential session
Poll a credential session until a vaulted credential is ready.
curl --request GET \
--url https://app.rubiehq.com/api/v1/credential-sessions/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.rubiehq.com/api/v1/credential-sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.rubiehq.com/api/v1/credential-sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.rubiehq.com/api/v1/credential-sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.rubiehq.com/api/v1/credential-sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.rubiehq.com/api/v1/credential-sessions/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.rubiehq.com/api/v1/credential-sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "sess_MQ",
"status": "pending",
"hosted_url": "https://app.rubiehq.com/credential-collect/abc123",
"return_url": "https://app.example.com/settings/integrations/connected",
"strategy_id": "strat_NQ",
"credential_id": null,
"expires_at": "2026-08-07T17:00:00.000Z",
"completed_at": null,
"created_at": "2026-07-31T17:00:00.000Z"
}status is pending (or any
status you do not recognize). Persist credential_id only when status is
completed.
curl -s "$RUBIE_API_URL/api/v1/credential-sessions/sess_..." \
-H "Authorization: Bearer $RUBIE_API_KEY"
Status values
| Status | Meaning |
|---|---|
pending | End user has not finished the hosted form |
completed | Terminal and usable — credential_id is present; store it |
expired | Terminal and not usable — create a new session |
status as an open string set. Additional non-terminal values may appear
later (for example while Rubie verifies the credential). Keep polling on
unrecognized values; only branch on the three above.
Notes
hosted_urlis present while the session is pending and cleared afterward.credential_idisnulluntilcompleted. Do not persist an id read from any other status.- If you used
return_url, call this endpoint on the redirect landing page to retrieve and save the completed session’scredential_id.
Authorizations
Your Rubie API key as a bearer token.
Path Parameters
Response
Session
"sess_MQ"
Lifecycle status of the session. completed always means terminal and usable: the credential is vaulted and may be passed to a run. expired is terminal and not usable. pending means the end user has not finished the hosted form yet.
Treat this as an open string set rather than a fixed enum. Additional non-terminal statuses may be introduced between collection and completed — for example while Rubie verifies the credential against the target system. Keep polling on any status you do not recognise, and only branch on the three values above. Code written as if (status === "completed") { save(credential_id) } stays correct.
pending, completed, expired "strat_NQ"
Rubie-hosted form URL. Open for the end user while status is pending.
Customer URL supplied when the session was created. After collection, Rubie redirects here with session_id appended as a query parameter.
Present only when status is completed, and stable for the life of the credential. Retain it against your user record. Do not persist an id read from a session in any other status.
"cred_NDc"